$TYPECHECK ON TYPE QPassword EXTENDS QOBJECT Private: Form AS QFORM Label1 AS QLABEL Label2 AS QLABEL Edit1 AS QEDIT Edit2 AS QEDIT Button1 AS QBUTTON Button2 AS QBUTTON Button3 AS QBUTTON retAction AS WORD Public: User AS STRING Pass AS STRING FUNCTION Get() AS WORD WITH QPassword .retAction = 0 .Edit1.Text = .User IF .Form.ShowModal THEN IF .retAction THEN .User = .Edit1.Text .Pass = .Edit2.Text result = 1 ELSE result = 0 END IF END IF END WITH END FUNCTION EVENT Button1.onclick(Sender AS QBUTTON) QPassword.retAction = 1 END EVENT EVENT Button2.onclick(Sender AS QBUTTON) QPassword.retAction = 0 END EVENT CONSTRUCTOR Form.Caption = "Password" Form.Width = 320 Form.Height = 100 Form.BorderStyle = 3 'Form.AddBorderIcons = 3 Form.Center Label1.Parent = QPassword.Form Label1.Caption = "User ID:" Label1.Left = 15 Label1.Top = 15 Label1.Width = 39 Label1.Transparent = 1 Label2.Parent = QPassword.Form Label2.Caption = "Password:" Label2.Left = 15 Label2.Top = 45 Label2.Width = 49 Label2.Transparent = 1 Edit1.Parent = QPassword.Form Edit1.Text = "" Edit1.Left = 75 Edit1.Top = 10 Edit1.CharCase = 2 '0 = Normal Entry Value, 1 = UpperCase Entry Value, 2 = LowerCase Entry Value Edit2.Parent = QPassword.Form Edit2.Text = "" Edit2.Left = 75 Edit2.Top = 40 Edit2.TabOrder = 1 Edit2.CharCase = 0 Edit2.PasswordChar = "*" Button1.Parent = QPassword.Form Button1.Caption = "&Ok" Button1.Left = 220 Button1.Top = 10 Button1.TabOrder = 2 Button1.Default = 1 Button1.Kind = 1 Button2.Parent = QPassword.Form Button2.Caption = "&Cancel" Button2.Left = 220 Button2.Top = 40 Button2.TabOrder = 3 Button2.Kind = 2 Button3.Parent = QPassword.Form Button3.Caption = "&Help" Button3.Left = 210 Button3.Top = 60 Button3.Visible = 0 Button3.TabOrder = 4 Button3.Kind = 3 END CONSTRUCTOR END TYPE