vb程序编程 登陆界面闰年vb程序编程 登陆界面闰年
Private Sub Command1_Click() Rem 静态:static
Static i As Integer
i = i + 1
If i > 3 Then
MsgBox "次数超限,Bye!", vbInformation End
End If
If Text2.Text = "1021" Then Unload Me
Form2.Show
Else: MsgBox "密码错误~请重新输入~", vbCritical Text2.Text = ""
...
vb程序编程 登陆界面闰年
Private Sub Command1_Click() Rem 静态:static
Static i As Integer
i = i + 1
If i > 3 Then
MsgBox "次数超限,Bye!", vbInformation End
End If
If Text2.Text = "1021" Then Unload Me
Form2.Show
Else: MsgBox "密码错误~请重新输入~", vbCritical Text2.Text = ""
Text2.SetFocus
End If
End Sub
Private Sub Command2_Click() Dim strl As String
strl = MsgBox("确定取消吗,", vbInformation + vbYesNo)
If strl = vbYes Then
End
End If
End Sub
1.欢迎
Private Sub Command1_Click() Print "欢迎进入VB的世界"""
End Sub
2.比较xy
Private Sub Command2_Click() Dim x As Integer
Dim y As Integer
x = InputBox("请输入变量x的值:")
y = InputBox("请输入变量y的值:")
If x < y Then
x = y
End If
Print x
End Sub
3.判断是否为闰年
Private Sub Command3_Click() Dim n As Integer
n = InputBox("请输入要判断的年份")
If n Mod 4 = 0 And n Mod 100 <> 0 Or n Mod 400 = 0 Then
Print n; "年是闰年"
Else
Print n; "年不是闰年"
End If
End Sub
本文档为【vb程序编程 登陆界面闰年】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑,
图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。