1。。。两个常用操作:
- // winform中隐藏标题栏
- this.FormBorderStyle = FormBorderStyle.None;
- //任务栏不显示
- this.ShowInTaskbar = false;
2..
- #region 判断是否为空
- private void JudgementTextState()
- {
- if (string.IsNullOrEmpty(txtUserName.Text.Trim()))
- {
- throw new Exception("用户帐号不能为空");
- }
- else if (string.IsNullOrEmpty(txtPWord.Text.Trim()))
- {
- throw new Exception("密码不能为空");
- }
- }
- #endregion
本文介绍如何在WinForm应用中隐藏窗体标题栏并禁用任务栏图标显示,同时提供了一个简单的文本框输入验证方法,确保用户输入不是空值。
950

被折叠的 条评论
为什么被折叠?



