home *** CD-ROM | disk | FTP | other *** search
/ Using Visual Basic 5 (Platinum Edition) / vb5.iso / Code / ch07 / EventForm.frm (.txt) next >
Encoding:
Visual Basic Form  |  1997-06-21  |  5.3 KB  |  177 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Event Sequence Demonstration"
  4.    ClientHeight    =   5175
  5.    ClientLeft      =   1140
  6.    ClientTop       =   1245
  7.    ClientWidth     =   6930
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   5175
  10.    ScaleWidth      =   6930
  11.    StartUpPosition =   2  'CenterScreen
  12.    Begin VB.CommandButton cmdExit 
  13.       Caption         =   "Exit"
  14.       Height          =   495
  15.       Left            =   4500
  16.       TabIndex        =   6
  17.       Top             =   4560
  18.       Width           =   1575
  19.    End
  20.    Begin VB.CommandButton Command1 
  21.       Caption         =   "Click here"
  22.       Height          =   495
  23.       Left            =   4200
  24.       TabIndex        =   5
  25.       Top             =   1680
  26.       Width           =   2175
  27.    End
  28.    Begin VB.TextBox Text1 
  29.       Height          =   375
  30.       Left            =   5040
  31.       TabIndex        =   2
  32.       Top             =   1200
  33.       Width           =   1575
  34.    End
  35.    Begin VB.CommandButton cmdClear 
  36.       Caption         =   "Clear and reset"
  37.       Height          =   495
  38.       Left            =   4500
  39.       TabIndex        =   1
  40.       Top             =   3960
  41.       Width           =   1575
  42.    End
  43.    Begin VB.ListBox List1 
  44.       Height          =   4935
  45.       Left            =   120
  46.       TabIndex        =   0
  47.       Top             =   120
  48.       Width           =   3375
  49.    End
  50.    Begin VB.Label Label2 
  51.       Alignment       =   1  'Right Justify
  52.       Caption         =   "Type or click here:"
  53.       Height          =   255
  54.       Left            =   3600
  55.       TabIndex        =   4
  56.       Top             =   1260
  57.       Width           =   1335
  58.    End
  59.    Begin VB.Label Label1 
  60.       BorderStyle     =   1  'Fixed Single
  61.       Caption         =   "The list box reports some of the events that occur to the text box and command button below, as well as the form itself."
  62.       Height          =   735
  63.       Left            =   3720
  64.       TabIndex        =   3
  65.       Top             =   240
  66.       Width           =   2895
  67.    End
  68. Attribute VB_Name = "Form1"
  69. Attribute VB_GlobalNameSpace = False
  70. Attribute VB_Creatable = False
  71. Attribute VB_PredeclaredId = True
  72. Attribute VB_Exposed = False
  73. Dim inThisEvent As Integer
  74. Private Sub cmdClear_Click()
  75.     List1.Clear
  76.     inThisEvent = 0
  77.     Text1.Text = ""
  78. End Sub
  79. Private Sub cmdExit_Click()
  80.     End
  81. End Sub
  82. Private Sub Command1_Click()
  83.     ShowEvent "Command1_Click"
  84. End Sub
  85. Private Sub Command1_GotFocus()
  86.     ShowEvent "Command1_GotFocus"
  87. End Sub
  88. Private Sub Command1_KeyDown(KeyCode As Integer, Shift As Integer)
  89.     ShowEvent "Command1_KeyDown"
  90. End Sub
  91. Private Sub Command1_KeyPress(KeyAscii As Integer)
  92.     ShowEvent "Command1_Click"
  93.     KeyPress
  94. End Sub
  95. Private Sub Command1_KeyUp(KeyCode As Integer, Shift As Integer)
  96.     ShowEvent "Command1_KeyUp"
  97. End Sub
  98. Private Sub Command1_LostFocus()
  99.     ShowEvent "Command1_LostFocus"
  100. End Sub
  101. Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  102.     ShowEvent "Command1_MouseDown"
  103. End Sub
  104. Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  105.     ShowEvent "Command1_MouseUp"
  106. End Sub
  107. Private Sub Form_Activate()
  108.     ShowEvent "Form_Activate"
  109. End Sub
  110. Private Sub Form_Click()
  111.     ShowEvent "Form_Click"
  112. End Sub
  113. Private Sub Form_DblClick()
  114.     ShowEvent "Form_DblClick"
  115. End Sub
  116. Private Sub Form_Deactivate()
  117.     ShowEvent "Form_Deactivate"
  118. End Sub
  119. Private Sub Form_GotFocus()
  120.     ShowEvent "Form_GotFocus"
  121. End Sub
  122. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  123.     ShowEvent "Form_KeyDown"
  124. End Sub
  125. Private Sub Form_KeyPress(KeyAscii As Integer)
  126.     ShowEvent "Form_KeyPress"
  127. End Sub
  128. Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
  129.     ShowEvent "Form_KeyUp"
  130. End Sub
  131. Private Sub Form_Load()
  132.     ShowEvent "Form_Load"
  133. End Sub
  134. Private Sub Form_LostFocus()
  135.     ShowEvent "Form_LostFocus"
  136. End Sub
  137. Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  138.     ShowEvent "Form_MouseDown"
  139. End Sub
  140. Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  141.     ShowEvent "Form_MouseUp"
  142. End Sub
  143. Private Sub Text1_Change()
  144.     ShowEvent "Text1_Change"
  145. End Sub
  146. Sub ShowEvent(s As String)
  147.     inThisEvent = inThisEvent + 1
  148.     List1.AddItem inThisEvent & ": " & s
  149. End Sub
  150. Private Sub Text1_Click()
  151.     ShowEvent "Text1_Click"
  152. End Sub
  153. Private Sub Text1_DblClick()
  154.     ShowEvent "Text1_DblClick"
  155. End Sub
  156. Private Sub Text1_GotFocus()
  157.     ShowEvent "Text1_GotFocus"
  158. End Sub
  159. Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
  160.     ShowEvent "Text1_KeyDown"
  161. End Sub
  162. Private Sub Text1_KeyPress(KeyAscii As Integer)
  163.     ShowEvent "Text1_KeyPress"
  164. End Sub
  165. Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
  166.     ShowEvent "Text1_KeyUp"
  167. End Sub
  168. Private Sub Text1_LostFocus()
  169.     ShowEvent "Text1_LostFocus"
  170. End Sub
  171. Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  172.     ShowEvent "Text1_MouseDown"
  173. End Sub
  174. Private Sub Text1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  175.     ShowEvent "Text1_MouseUp"
  176. End Sub
  177.