VERSION 5.00 Begin VB.Form EnterPasswordForm BorderStyle = 3 'Fixed Dialog Caption = "P4OFC - Enter Password" ClientHeight = 2175 ClientLeft = 45 ClientTop = 330 ClientWidth = 4320 ControlBox = 0 'False LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 2175 ScaleWidth = 4320 ShowInTaskbar = 0 'False StartUpPosition = 1 'CenterOwner Begin VB.TextBox txtUser Enabled = 0 'False Height = 375 IMEMode = 3 'DISABLE Left = 1200 TabIndex = 3 Top = 600 Width = 2655 End Begin VB.TextBox txtP4Port Enabled = 0 'False Height = 375 IMEMode = 3 'DISABLE Left = 1200 TabIndex = 1 Top = 120 Width = 2655 End Begin VB.TextBox txtPassword Height = 375 IMEMode = 3 'DISABLE Left = 1200 PasswordChar = "*" TabIndex = 5 Top = 1080 Width = 2655 End Begin VB.CommandButton cmdCancel Cancel = -1 'True Caption = "Cancel" Height = 375 Left = 2400 TabIndex = 7 Top = 1680 Width = 1215 End Begin VB.CommandButton cmdOK Caption = "OK" Default = -1 'True Height = 375 Left = 960 TabIndex = 6 Top = 1680 Width = 1215 End Begin VB.Label lblServer Caption = "P4PORT:" Height = 255 Left = 240 TabIndex = 0 Top = 120 Width = 855 End Begin VB.Label lblUser Caption = "User:" Height = 255 Left = 240 TabIndex = 2 Top = 600 Width = 735 End Begin VB.Label Label1 Caption = "&Password:" Height = 255 Left = 240 TabIndex = 4 Top = 1080 Width = 855 End End Attribute VB_Name = "EnterPasswordForm" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Private m_Action As VbMsgBoxResult Private m_p4 As P4COM.p4 Private Sub DoClick(Action As VbMsgBoxResult) Me.Hide m_Action = Action End Sub Private Sub cmdCancel_Click() Dim t As Tracker: Set t = GStackTrace.Enter(TypeName(Me), "cmdCancel_Click") On Error GoTo Error_Block DoClick vbCancel Exit Sub Error_Block: 't.Report End Sub Private Sub cmdOK_Click() Dim t As Tracker: Set t = GStackTrace.Enter(TypeName(Me), "cmdOK_Click") On Error GoTo Error_Block m_p4.Input = txtPassword.Text If CommandSuccessful("login", m_p4, " logged in.") Then DoClick vbOK Else MsgBox "Invalid password. Please try again.", vbExclamation + vbOKOnly txtPassword.Text = "" txtPassword.SetFocus End If Exit Sub Error_Block: t.Report End Sub Public Function Answer(p4 As P4COM.p4) As VbMsgBoxResult Dim t As Tracker: Set t = GStackTrace.Enter(TypeName(Me), "Answer") On Error GoTo Error_Block Answer = vbCancel m_Action = vbCancel Set m_p4 = p4 txtP4Port.Text = p4.port txtUser.Text = p4.User Screen.MousePointer = vbDefault ShowForm Me, True Answer = m_Action Unload Me Exit Function Error_Block: t.Report End Function