Blacky
03-05-2006, 12:18 AM
فقط موندم کجا باید براش یوزر تعریف کرد
Option Explicit
Public LoginSucceeded As Boolean
Private Sub cmdCancel_Click()
'set the global var to false
'to denote a failed login
LoginSucceeded = False
MsgBox "شما از برنامه خارج شديد"
Me.Hide
End Sub
Private Sub cmdOK_Click()
'check for correct password
If txtPassword = "09153037456" Then
'place code to here to pass the
'success to the calling sub
'setting a global var is the easiest
LoginSucceeded = True
Me.Hide
Else
MsgBox "رمز اشتباه است , دوباره سعي کنيد", , "Login"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
End Sub
Option Explicit
Public LoginSucceeded As Boolean
Private Sub cmdCancel_Click()
'set the global var to false
'to denote a failed login
LoginSucceeded = False
MsgBox "شما از برنامه خارج شديد"
Me.Hide
End Sub
Private Sub cmdOK_Click()
'check for correct password
If txtPassword = "09153037456" Then
'place code to here to pass the
'success to the calling sub
'setting a global var is the easiest
LoginSucceeded = True
Me.Hide
Else
MsgBox "رمز اشتباه است , دوباره سعي کنيد", , "Login"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
End Sub