form1.frm
来自「一个小的登陆系统,验证用户的登陆信息,里面有信息,非常简单,」· FRM 代码 · 共 52 行
FRM
52 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3165
ClientLeft = 60
ClientTop = 375
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3165
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.PictureBox Picture1
Height = 1455
Left = 360
ScaleHeight = 1395
ScaleWidth = 3795
TabIndex = 0
Top = 480
Width = 3855
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
Dim username As String
username = InputBox("请输入用户名!")
Dim usernames(3) As String
usernames(0) = "xiaow"
usernames(1) = "xiaol"
usernames(2) = "xiaoz"
usernames(3) = "xiaoh"
Dim flag As Boolean
flag = False
Dim i As Integer
For i = o To 3
If username = usernames(i) Then
flag = True
End If
Next i
If flag = False Then
MsgBox "用户确认失败,退出系统!"
End
End If
End Sub
Private Sub Picture1_Paint()
Picture1.Print "you are welcome"
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?