Private m_oParentForm As Form ' the form from which this form was launched
Private bShiftKeyDown As Boolean ' used to close parent form if <Shift> held during close
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub Form_Load()
' place form at top-right of screen
Move Abs(Screen.Width - Width), 0
' setup the tips text
With txtTipsAndTricks
.Text = "Proper Names" & vbCrLf & "You can use the .Case and .CaseProper properties to make you data entry forms really 'smart.' Together, these properties allow you to have any letter which follows a space (or your custom defined strings) auto-capitalized, e.g. the 'd' in McDonald. For further details please see the frmMhMaskInputDemo's Form_Load event and the OLETools helpfile."
.Text = .Text & vbCrLf & vbCrLf & "Using Undo" & vbCrLf & "This control has an .Undo property which is used like a method to undo the last change made to the text within the control. You can use this feature to automatically implement an 'undo' option in your programs."
End With ' txtTipsAndTricks
End Sub
Public Property Set ParentForm(oNewForm As Form)
Set m_oParentForm = oNewForm
End Property
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyShift Then bShiftKeyDown = True
End Sub
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
bShiftKeyDown = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
' if the user held <Shift> down while closing window then close parent window too