home *** CD-ROM | disk | FTP | other *** search
/ ActiveX Programming Unleashed CD / AXU.iso / activex / demos / oletrial / samples / vb / mhminp / tips.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-11-30  |  3.0 KB  |  71 lines

  1. VERSION 4.00
  2. Begin VB.Form frmTips 
  3.    Caption         =   "Tip On Using The MhMaskInput "
  4.    ClientHeight    =   2964
  5.    ClientLeft      =   1200
  6.    ClientTop       =   1884
  7.    ClientWidth     =   5328
  8.    Height          =   3348
  9.    Icon            =   "tips.frx":0000
  10.    KeyPreview      =   -1  'True
  11.    Left            =   1152
  12.    LinkTopic       =   "Form1"
  13.    ScaleHeight     =   2964
  14.    ScaleWidth      =   5328
  15.    Top             =   1548
  16.    Width           =   5424
  17.    Begin VB.CommandButton cmdClose 
  18.       Appearance      =   0  'Flat
  19.       BackColor       =   &H00D9A8AE&
  20.       Cancel          =   -1  'True
  21.       Caption         =   "&Close"
  22.       Default         =   -1  'True
  23.       Height          =   372
  24.       Left            =   4032
  25.       TabIndex        =   1
  26.       Top             =   2520
  27.       Width           =   1212
  28.    End
  29.    Begin VB.TextBox txtTipsAndTricks 
  30.       Height          =   2352
  31.       Left            =   72
  32.       Locked          =   -1  'True
  33.       MultiLine       =   -1  'True
  34.       ScrollBars      =   2  'Vertical
  35.       TabIndex        =   0
  36.       Top             =   72
  37.       Width           =   5172
  38.    End
  39. Attribute VB_Name = "frmTips"
  40. Attribute VB_Creatable = False
  41. Attribute VB_Exposed = False
  42. Option Explicit
  43. Private m_oParentForm As Form ' the form from which this form was launched
  44. Private bShiftKeyDown  As Boolean ' used to close parent form if <Shift> held during close
  45. Private Sub cmdClose_Click()
  46.     Unload Me
  47. End Sub
  48. Private Sub Form_Load()
  49.     ' place form at top-right of screen
  50.     Move Abs(Screen.Width - Width), 0
  51.     ' setup the tips text
  52.     With txtTipsAndTricks
  53.         .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."
  54.         .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."
  55.     End With ' txtTipsAndTricks
  56. End Sub
  57. Public Property Set ParentForm(oNewForm As Form)
  58.     Set m_oParentForm = oNewForm
  59. End Property
  60. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  61.     If KeyCode = vbKeyShift Then bShiftKeyDown = True
  62. End Sub
  63. Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
  64.     bShiftKeyDown = False
  65. End Sub
  66. Private Sub Form_Unload(Cancel As Integer)
  67.     ' if the user held <Shift> down while closing window then close parent window too
  68.     If bShiftKeyDown Then Unload m_oParentForm
  69.     Set m_oParentForm = Nothing
  70. End Sub
  71.