标题:请高手给解释解释都什么意思?!!!!!谢谢!!!!!!!
只看楼主
编程晓海
Rank: 1
等 级:新手上路
帖 子:20
专家分:0
注 册:2008-6-4
 问题点数:0 回复次数:2 
请高手给解释解释都什么意思?!!!!!谢谢!!!!!!!
Option Explicit
Const 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
搜索更多相关主题的帖子: 内存 MxUser App 
2008-06-09 13:57
multiple1902
Rank: 8Rank: 8
等 级:贵宾
威 望:42
帖 子:4881
专家分:671
注 册:2007-2-9
得分:0 
基本的语句看课本。
哪句不理解就问哪句,我没看到什么难点。
2008-06-09 14:27
jxyga111
Rank: 8Rank: 8
来 自:中華人民共和國
等 级:贵宾
威 望:33
帖 子:6015
专家分:895
注 册:2008-3-21
得分:0 
你不標出來誰知道你那不懂
2008-06-10 19:27



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-218327-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.079846 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved