private sub Form_Resize( )
General information
Full name frmCustomer.Form_Resize Access private Overload of Purpose Moves the controls according to the form size. Comment If you add a new control in this form you must add the code the position of this control. Prototype private sub Form_Resize( ) History NOVALYS - 2001/10/20 - Creation
Source code
Private Sub Form_Resize()
'*********************************************************
' Purpose : Moves the controls according to the form size.
' Comment : If you add a new control in this form you must add the code the position of this control.
' Subject : GUI
' History : NOVALYS - 2001/10/20 - Creation
'*********************************************************
On Error Resume Next
lblStatus.Width = Me.Width - 1500
cmdNext.Left = lblStatus.Width + 700
cmdLast.Left = cmdNext.Left + 340
End Sub
Referenced classes
Full name cmdLast cmdNext frmCustomer lblStatus
private sub Form_KeyDown( KeyCode as Integer , Shift as Integer )
General information
Full name frmCustomer.Form_KeyDown Access private Overload of Purpose Form-Level Keyboard Handlers. Parameter KeyCode : The key code the key that was pressed. Shift : An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys at the time of the event. Prototype private sub Form_KeyDown( KeyCode as Integer , Shift as Integer ) History NOVALYS - 2001/10/20 - Creation
Parameters
Shift Integer KeyCode Integer
Source code
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
'*********************************************************
' Purpose : Form-Level Keyboard Handlers.
' Comment :
' Parameter : KeyCode : The key code the key that was pressed.
' Shift : An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys at the time of the event.
' Subject : GUI
' History : NOVALYS - 2001/10/20 - Creation
'*********************************************************
If mbEditFlag Or mbAddNewFlag Then Exit Sub
Select Case KeyCode
Case vbKeyEscape
cmdClose_Click
Case vbKeyEnd
cmdLast_Click
Case vbKeyHome
cmdFirst_Click
Case vbKeyUp, vbKeyPageUp
If Shift = vbCtrlMask Then
cmdFirst_Click
Else
cmdPrevious_Click
End If
Case vbKeyDown, vbKeyPageDown
If Shift = vbCtrlMask Then
cmdLast_Click
Else
cmdNext_Click
End If
End Select
End Sub
Functions and events referenced
Full name Owners cmdNext.cmdNext_Click cmdNext cmdPrevious.cmdPrevious_Click cmdPrevious cmdFirst.cmdFirst_Click cmdFirst cmdLast.cmdLast_Click cmdLast cmdClose.cmdClose_Click cmdClose
Referenced properties
Full name Scope frmCustomer.Form_KeyDown.Shift parameter frmCustomer.Form_KeyDown.KeyCode parameter frmCustomer.mbAddNewFlag attribute frmCustomer.mbEditFlag attribute
private sub Form_Unload( Cancel as Integer )
General information
Full name frmCustomer.Form_Unload Access private Overload of
Parameters
Cancel Integer
Source code
Private Sub Form_Unload(Cancel As Integer)
Screen.MousePointer = vbDefault
End Sub
private sub Form_Load( )
General information
Full name frmCustomer.Form_Load Access private Overload of Purpose Set the security of this form and loads data from the database. Prototype private sub Form_Load( ) History NOVALYS - 2001/10/20 - Creation
Local variables
oText TextBox
Source code
Private Sub Form_Load()
'*********************************************************
' Purpose : Set the security of this form and loads data from the database.
' Subject : INTERNAL
' History : NOVALYS - 2001/10/20 - Creation
'*********************************************************
On Error GoTo AddErr
intRet = MyVisualGuard.SetSecurity(Me, "open", "")
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select id,fname,lname,address,city,state,zip,phone,company_name from customer", db, adOpenStatic, adLockOptimistic
Dim oText As TextBox
'Link the textfield to the recorsdset
For Each oText In Me.txtFields
Set oText.DataSource = adoPrimaryRS
Next
mbDataChanged = False
Exit Sub
AddErr:
MsgBox Err.Description, , "Visual Guard"
End Sub
Functions and events referenced
Full name Owners Recordset.Open Recordset MyVG.SetSecurity MyVG
Referenced classes
Full name txtFields frmCustomer Recordset adoPrimaryRS
Referenced properties
Full name Scope frmCustomer.mbDataChanged attribute frmCustomer.Form_Load.oText local ModMain.db attribute ModMain.MyVisualGuard attribute frmCustomer.intRet attribute
Document created on Wednesday 20 March 2002 at 09:57 by Visual Expert