惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
CERT Recently Published Vulnerability Notes
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
Security Latest
Security Latest
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AI
AI
Cisco Talos Blog
Cisco Talos Blog
K
Kaspersky official blog
S
Secure Thoughts
PCI Perspectives
PCI Perspectives
Simon Willison's Weblog
Simon Willison's Weblog
D
DataBreaches.Net
GbyAI
GbyAI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
罗磊的独立博客
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
V
V2EX
Last Week in AI
Last Week in AI
有赞技术团队
有赞技术团队
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tenable Blog
T
Threat Research - Cisco Blogs
T
Troy Hunt's Blog
V2EX - 技术
V2EX - 技术
S
Security @ Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
L
Lohrmann on Cybersecurity
F
Full Disclosure
H
Help Net Security
博客园 - Franky
Stack Overflow Blog
Stack Overflow Blog
N
Netflix TechBlog - Medium
Engineering at Meta
Engineering at Meta
A
Arctic Wolf
O
OpenAI News
S
Securelist

博客园 - Voodoo's天空

时间、事件、实践 投票作弊程序制作思路(续)——突破IP限制投票 投票作弊程序制作思路 C#中使用正则表达式清除javascript脚本的方法 迁移SharePoint Portal Server 2003 (sps2003) 需要注意和出现的问题 一年没有更新自己的BLOG了,主要是记录一些从sqlserver导数据到oracle的解决方法 2004年的最后一个POST 开发自定义控件的笔记 (2) 开发自定义控件的笔记(1) 利用ADO中记录集筛选 Smart Client 高级开发 图解Windows历史 非常好的思想 (Design your web pages freely at runtime - by Jasper) 一个PHP版本的数据库操作类,针对MYSQL的 在不同语言中关于CheckBox的处理办法(ASP、JSP、PHP) 一个不完整的OLEDB操作类(自己乱写的,呵呵) 在应用程序中打开浏览器 周末的中日之战…… 关于值类型和引用类型比较的问题
Winform的登录窗体设计思路
Voodoo's天空 · 2004-08-31 · via 博客园 - Voodoo's天空

其实这种登录窗体的设计有很多种模式。而且实现起来都很简单,我简单列举两种方式

这里的方法都涉及到了多窗体传递数据的问题,请参考我以前的一篇文章《多窗体传递数据》http://www.cnblogs.com/voodooq/archive/2004/06/14/15446.aspx

1、Main窗体为登录窗体模式。

这种模式应该是比较方便而且简单的一种实现方法,

描述:
在Main窗体中建立登录信息等内容,然后点击登录按钮后在本窗体进行验证,当符合条件的时候,隐藏本窗体而显示功能窗体。

相关代码:

2、弹出登录窗体模式

这种登录当时相对上面一种稍微复杂一点,需要使用多窗体数据传递的方法。

描述:
这里,将Main窗体作为登录后的处理窗体,而在Main窗体载入的时候,用ShowDialog()方法,显示登录窗体,然后在登录窗体进行相应的操作以及判断,并将数据传递过去。然后隐藏登录窗体,显示Main窗体。

代码:


3、使用独立进程的登录窗体

现在这种模式我还没有实现,概念就是登录窗体和Main窗体使用各自独立的进程,而当登录成功的时候不再是隐藏登录窗体,而是关闭。这样应该是对释放资源有一定好处的,呵呵

以上是我的一些个人看法,有什么问题,还请大家多多指正,或者您有更好的实现登录的方法,请告诉我。