home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD173623202001.psc / MouseEventsDemo.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-03-19  |  3.5 KB  |  116 lines

  1. VERSION 5.00
  2. Begin VB.Form frmMouseEventsDemo 
  3.    BackColor       =   &H00FF0000&
  4.    Caption         =   "Mouse Events Demo"
  5.    ClientHeight    =   5370
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   8055
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   5370
  11.    ScaleWidth      =   8055
  12.    StartUpPosition =   2  'CenterScreen
  13.    Begin VB.CommandButton cmdStartOpen 
  14.       Caption         =   "Start Open"
  15.       Height          =   360
  16.       Left            =   5715
  17.       TabIndex        =   7
  18.       Top             =   4170
  19.       Width           =   990
  20.    End
  21.    Begin VB.CommandButton CmdEnd 
  22.       Caption         =   "End"
  23.       Height          =   360
  24.       Left            =   6825
  25.       TabIndex        =   6
  26.       Top             =   4170
  27.       Width           =   870
  28.    End
  29.    Begin VB.CommandButton cmdStart 
  30.       Caption         =   "Start"
  31.       Height          =   360
  32.       Left            =   4725
  33.       TabIndex        =   5
  34.       Top             =   4170
  35.       Width           =   870
  36.    End
  37.    Begin VB.PictureBox picDemo 
  38.       Height          =   915
  39.       Left            =   6960
  40.       Picture         =   "MouseEventsDemo.frx":0000
  41.       ScaleHeight     =   855
  42.       ScaleWidth      =   900
  43.       TabIndex        =   4
  44.       Top             =   810
  45.       Width           =   960
  46.    End
  47.    Begin VB.TextBox txtEventInfo 
  48.       Height          =   360
  49.       Left            =   4740
  50.       TabIndex        =   3
  51.       Top             =   3660
  52.       Width           =   2835
  53.    End
  54.    Begin VB.TextBox txtDemo 
  55.       Height          =   5220
  56.       Left            =   30
  57.       MultiLine       =   -1  'True
  58.       TabIndex        =   2
  59.       Text            =   "MouseEventsDemo.frx":4206
  60.       Top             =   45
  61.       Width           =   4515
  62.    End
  63.    Begin VB.CommandButton cmdExit 
  64.       Caption         =   "Exit"
  65.       Height          =   435
  66.       Left            =   6915
  67.       TabIndex        =   1
  68.       Top             =   4800
  69.       Width           =   1005
  70.    End
  71.    Begin MouseEventsDemo.ctlMouseEvents MouseEvents 
  72.       Height          =   480
  73.       Left            =   4725
  74.       TabIndex        =   0
  75.       Top             =   90
  76.       Width           =   2100
  77.       _ExtentX        =   3704
  78.       _ExtentY        =   847
  79.    End
  80.    Begin VB.Label Label1 
  81.       BackStyle       =   0  'Transparent
  82.       Caption         =   "Or get event info thru raised event"
  83.       ForeColor       =   &H0000FFFF&
  84.       Height          =   270
  85.       Left            =   4890
  86.       TabIndex        =   8
  87.       Top             =   3330
  88.       Width           =   2565
  89.    End
  90. Attribute VB_Name = "frmMouseEventsDemo"
  91. Attribute VB_GlobalNameSpace = False
  92. Attribute VB_Creatable = False
  93. Attribute VB_PredeclaredId = True
  94. Attribute VB_Exposed = False
  95. Option Explicit
  96. Private Sub cmdExit_Click()
  97.     Unload Me
  98.     End
  99. End Sub
  100. Private Sub cmdStart_Click()
  101.     MouseEvents.TrackEvents True
  102. End Sub
  103. Private Sub cmdStartOpen_Click()
  104.     MouseEvents.TrackEvents True, True
  105. End Sub
  106. Private Sub CmdEnd_Click()
  107.     MouseEvents.TrackEvents False
  108. End Sub
  109. Private Sub MouseEvents_MouseEvent(x As Integer, _
  110.                             y As Integer, _
  111.                             Msg As Long, wParam As Long, _
  112.                             Ctl As Object)
  113.     txtEventInfo = x & "," & y & " - " & Msg & _
  114.                        " - " & wParam & " - " & Ctl.Name
  115. End Sub
  116.