VB程序学习代码记录20160722(2)
来源:互联网 发布:公司加密软件 破解 编辑:程序博客网 时间:2024/06/09 17:01
用户登录
**form1:**Private Sub Command1_Click() If Text1.Text <> "" Then If Text2.Text = "" Then MsgBox "请输入密码!" Exit Sub Else Form2.Show Me.Hide End If Else MsgBox "请输入用户名!" Exit Sub End IfEnd SubPrivate Sub Command2_Click() Unload MeEnd SubPrivate Sub Form_Load() Me.Show Form2.Hide Me.Caption = "登录窗体" Label1.Caption = "用户名" Label2.Caption = "密 码" Command1.Caption = "登陆" Command2.Caption = "退出" Text1.Text = "" Text2.Text = ""End SubPrivate Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) If MsgBox("是否关闭程序?", vbQuestion + vbYesNo, "信息提示") = vbNo Then Cancel = True End IfEnd Sub**form2**Private Sub Command1_Click() Unload MeEnd SubPrivate Sub Form_Load() Me.Caption = "客户管理系统" Command1.Caption = "关闭系统"End SubPrivate Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) If MsgBox("是否关闭程序", vbQuestion + vbYesNo, "信息提示") = vbNo Then Cancel = True End IfEnd Sub
编写程序代码获取当前程序所在目录路径
Private Sub Form_Load() Label1.Caption = App.PathEnd Sub
0 0
- VB程序学习代码记录20160722(2)
- VB程序学习代码记录20160722
- VB程序学习代码记录20160718(2)
- VB程序学习代码记录20160723(2)
- VB程序学习代码记录20160711
- VB程序学习代码记录20160713
- VB程序学习代码记录20160714
- VB程序学习代码记录20160715
- VB程序学习代码记录20160717
- VB程序学习代码记录20160718
- VB程序学习代码记录20160719
- VB程序学习代码记录20160721
- VB程序学习代码记录20160723
- VB程序学习代码记录20160724
- VB程序学习代码记录20160725
- VB程序学习代码记录20160726
- VB程序学习代码记录20160729
- VB程序学习代码记录20160730
- for循环的经典程序分析
- 【NOIP2013提高组T5】花匠-O(n)横扫做法
- 详解Less运算符和函数
- 图像视频数据集网站
- 实现简单工厂(一)
- VB程序学习代码记录20160722(2)
- Mybatis的面向接口开发中的注意事项
- python DNS处理模块dnspython
- 关于JavaWeb如何实现用户类似站内信功能
- iOS开发 iOS7显示偏差(UITableView下移)解决办法
- java代码显示正确执行,但为何数据未成功插入数据库?原因如下
- Openstack
- Boolean
- Java判断字符串是否是整数或者浮点数