请高手给解释解释都什么意思?!!!!!谢谢!!!!!!!
Option ExplicitConst MxUser = 100
Public EmploID As Integer
Public CurUser As String
Public CurId As String
Public CurPsw As String
Dim user(MxUser), pws(MxUser), state(MxUser), Emplo(MxUser) As String
Private Sub Form_Load()
Dim i As Integer
If App.PrevInstance Then
MsgBox ("程序已经运行,不能再次装载。"), vbExclamation
Unload Me
End If
'本段代码用于判定本程序是否已经装载于内存中,以避免程序的多重启动
i = 0
Open App.Path + "\user.ini" For Input As #1
Do While Not EOF(1)
Input #1, user(i), pws(i), state(i), Emplo(i)
If state(i) = "A" Then
Combo1.AddItem user(i)
End If
i = i + 1
Loop
Close #1
Combo1.ListIndex = 1
'在窗口装载阶段读取用户设置文件获取用户信息 并装载于用户列表框中
End Sub
Private Sub CmdCancel_Click()
Unload Me
End
End Sub
Private Sub cmdOK_Click()
If txtPassword = pws(Combo1.ListIndex) Then
CurId = Combo1.ListIndex
EmploID = Emplo(CurId)
CurUser = user(CurId)
CurPsw = pws(CurId)
Me.Hide
'Load FrmMain
FrmMain.Show
Else
MsgBox "Invalid Password, try again!", , "Login"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
End
End Sub