>************************************************** >*-- Form: form1 (c:\hprc\password.scx) >*-- ParentClass: form >*-- BaseClass: form >*-- Time Stamp: 05/05/08 01:52:02 PM >* >DEFINE CLASS form1 AS form > > > Top = 0 > Left = 0 > Height = 181 > Width = 356 > DoCreate = .T. > Caption = "Password" > WindowType = 1 > Name = "form1" > > > ADD OBJECT lblstrain1 AS stonelabel WITH ; > FontName = "MS Sans Serif", ; > FontSize = 9, ; > Caption = "Name", ; > Left = 28, ; > Top = 23, ; > Visible = .T., ; > Width = 65, ; > Name = "LBLSTRAIN1" > > > ADD OBJECT stonelabel1 AS stonelabel WITH ; > FontName = "MS Sans Serif", ; > FontSize = 9, ; > Caption = "Password", ; > Height = 15, ; > Left = 28, ; > Top = 74, ; > Visible = .T., ; > Width = 81, ; > Name = "Stonelabel1" > > > ADD OBJECT cboUsername AS combobox WITH ; > ColumnCount = 0, ; > ColumnWidths = "", ; > RowSourceType = 6, ; > RowSource = "users.username", ; > ControlSource = "Users.Username", ; > FirstElement = 1, ; > Height = 24, ; > Left = 123, ; > NumberOfElements = 0, ; > Style = 2, ; > Top = 18, ; > Width = 100, ; > Name = "cboUsername" > > > ADD OBJECT cmdCancel AS commandbutton WITH ; > Top = 120, ; > Left = 227, ; > Height = 25, ; > Width = 66, ; > Caption = "Cancel", ; > Name = "cmdCancel" > > > ADD OBJECT cmdOk AS commandbutton WITH ; > Top = 120, ; > Left = 142, ; > Height = 25, ; > Width = 66, ; > Caption = "OK", ; > Name = "cmdOk" > > > ADD OBJECT txtPassword AS textbox WITH ; > Value = "", ; > Format = "", ; > Height = 23, ; > InputMask = "", ; > Left = 123, ; > Top = 70, ; > Width = 100, ; > PasswordChar = "*", ; > Name = "txtPassword" > > > PROCEDURE Load > THISFORM.Icon ="LOCATION.ICO" > ENDPROC > > > PROCEDURE cmdCancel.Click > release thisform > ENDPROC > > > PROCEDURE cmdOk.Click > if Seek(rtrim(thisform.cboUsername.value), 'Users','Username') > if rtrim(Users.Password) = rtrim(thisform.txtPassword.value) > * This is a valid user > else > * ? Is it possible to have multiple users with the same ID - should be not, use Candidate index (or Primary for this) > * The password is not valid > endif > else > * The User is not found > endif > DO FORM C:\HPRC\MANAGEMENT.SCX > release thisform > > ENDPROC > > >ENDDEFINE >* >*-- EndDefine: form1 >************************************************** >>