home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form RTMouse_Form
- Caption = "RTMOUSE Test"
- ClientHeight = 5325
- ClientLeft = 1140
- ClientTop = 1050
- ClientWidth = 5085
- ClipControls = 0 'False
- Height = 6015
- Left = 1080
- LinkTopic = "Form1"
- ScaleHeight = 5325
- ScaleWidth = 5085
- Top = 420
- Width = 5205
- Begin RTMOUSE RtMouse1
- Prop16 = "Click for About Box"
- BackColor = &H0000FFFF&
- BalloonArrow = 0 'False
- BalloonHorizontalOffset= 10
- BalloonLocationMethod= 2 'Reference to Cursor
- BalloonType = 3 'Rounded
- BalloonVerticalOffset= 20
- ForeColor = &H000000FF&
- InverseVideo = 0 'False
- Left = 2400
- Top = 3480
- End
- Begin CommandButton BTN_RTMouseStop
- Caption = "Stop RTM"
- Height = 375
- Left = 1920
- TabIndex = 15
- Top = 720
- Width = 1215
- End
- Begin CommandButton BTN_RTMouseStart
- Caption = "Start RTM"
- Height = 375
- Left = 240
- TabIndex = 14
- Top = 720
- Width = 1215
- End
- Begin ComboBox Combo1
- Height = 300
- Left = 240
- TabIndex = 13
- Text = "Combo1"
- Top = 2880
- Width = 2175
- End
- Begin OptionButton Option3
- Caption = "Maybe option"
- Height = 255
- Left = 1200
- TabIndex = 12
- Top = 4320
- Width = 1575
- End
- Begin PictureBox Picture1
- AutoSize = -1 'True
- ClipControls = 0 'False
- Height = 360
- Left = 360
- Picture = GENERAPP.FRX:0000
- ScaleHeight = 330
- ScaleWidth = 360
- TabIndex = 11
- Top = 3600
- Width = 390
- End
- Begin CheckBox Check2
- Caption = "That"
- Height = 255
- Left = 1200
- TabIndex = 10
- Top = 3840
- Width = 1200
- End
- Begin CheckBox Check1
- Caption = "This"
- Height = 255
- Left = 1200
- TabIndex = 9
- Top = 3360
- Width = 1200
- End
- Begin Frame Frame1
- Caption = "Do it now"
- Height = 1215
- Left = 3000
- TabIndex = 6
- Top = 3120
- Width = 1695
- Begin OptionButton Option2
- Caption = "No"
- Height = 255
- Left = 240
- TabIndex = 8
- Top = 720
- Width = 1000
- End
- Begin OptionButton Option1
- Caption = "Yes"
- Height = 255
- Left = 240
- TabIndex = 7
- Top = 360
- Width = 1000
- End
- End
- Begin TextBox TXT_Result
- Height = 375
- Left = 120
- TabIndex = 5
- Text = "Status output"
- Top = 4800
- Width = 4815
- End
- Begin TextBox TXT_KeyString
- Height = 375
- Left = 120
- TabIndex = 2
- Text = "This is a popup message to display in the window. The message can be of long length, or it can be short."
- Top = 1560
- Width = 4815
- End
- Begin CommandButton BTN_Exit
- Caption = "Exit"
- Height = 375
- Left = 3600
- TabIndex = 1
- Top = 720
- Width = 1215
- End
- Begin TextBox TXT_SearchString
- Height = 375
- Left = 120
- TabIndex = 0
- Text = "Dawg"
- Top = 2280
- Width = 4815
- End
- Begin Label Label2
- Alignment = 2 'Center
- Caption = "Click ""Start RTM"" and Click the right mouse button on a control to display the popup balloon."
- Height = 375
- Left = 240
- TabIndex = 16
- Top = 120
- Width = 4575
- End
- Begin Label Label3
- Alignment = 2 'Center
- Caption = "Search String"
- Height = 255
- Left = 120
- TabIndex = 4
- Top = 2000
- Width = 4815
- End
- Begin Label Label1
- Alignment = 2 'Center
- Caption = "Key String"
- Height = 255
- Left = 120
- TabIndex = 3
- Top = 1280
- Width = 4815
- End
- Begin Menu nmu_File
- Caption = "&File"
- Begin Menu mnu_Exit
- Caption = "&Exit"
- End
- End
- Begin Menu mnu_Edit
- Caption = "&Edit"
- Begin Menu mnu_Cut
- Caption = "Cu&t"
- End
- Begin Menu mnu_Copy
- Caption = "&Copy"
- End
- Begin Menu mnu_Paste
- Caption = "&Paste"
- End
- Begin Menu mnu_submenu
- Caption = "SubMenu"
- Begin Menu mnu_submenu1
- Caption = "SubMenu 1"
- End
- Begin Menu mnu_submenu2
- Caption = "SubMenu 2"
- End
- End
- End
- Begin Menu mnu_help
- Caption = "&Help"
- Begin Menu mnu_HelpBalloons
- Caption = "Help &Balloons"
- End
- End
- Option Explicit
- ' Declare statements for utility functions included in RTMOUSE.VBX
- Declare Function Hwnd2ControlTabIndex Lib "RTMOUSE.VBX" (ByVal hwndControl%) As Integer
- Declare Function Hwnd2CtlName Lib "RTMOUSE.VBX" (ByVal hwndControl%) As String
- Declare Function Hwnd2HelpContextID Lib "RTMOUSE.VBX" (ByVal hwndControl%) As Long
- Declare Function Hwnd2TagText Lib "RTMOUSE.VBX" (ByVal hwndControl%) As String
- Sub BTN_Exit_Click ()
- mnu_Exit_Click
- End Sub
- Sub BTN_RTMouseStart_Click ()
- Rtmouse1.Action = 50 'start
- End Sub
- Sub BTN_RTMouseStop_Click ()
- Rtmouse1.Action = 51 ' stop
- End Sub
- Sub Form_Resize ()
- If Me.WindowState = 0 Then
- Me.Height = 6015
- Me.Width = 5175
- Me.Top = 0
- Me.Left = 0
- End If
- End Sub
- Sub mnu_Exit_Click ()
- End
- End Sub
- Sub RtMouse1_RtMouseClick (hwndAtMouse As Integer)
- ' PURPOSE: hwndAtMouse is the control the mouse is over
- ' COMMENTS: pass back the help text
- ' shows how to programmatcially end a session
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- Dim Msg As String
- Dim CRLF As String
- CRLF = Chr$(13) + Chr$(10)
- ' use utility routines to retieve help text
- TXT_Result.Text = Hwnd2CtlName(hwndAtMouse) + " ... hwndAtMouse = " + Hex$(hwndAtMouse)
- Select Case hwndAtMouse
- Case Me.hWnd
- Exit Sub ' do nothing
- Case BTN_RTMouseStart.hWnd
- Rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control BTN_RTMouseStart."
- Case BTN_RTMouseStop.hWnd
- Rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control BTN_RTMouseStop."
- Case BTN_Exit.hWnd
- Rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control BTN_Exit."
- Case TXT_KeyString.hWnd
- Rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control TXT_KeyString."
- Case TXT_SearchString.hWnd
- Rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control TXT_SearchString."
- Case TXT_Result.hWnd
- Rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control TXT_Result."
- Case Picture1.hWnd
- Rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Picture1."
- Case Check1.hWnd
- Rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Check1."
- Case Check2.hWnd
- Rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Check2."
- Case Frame1.hWnd
- Rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Frame1."
- Case Option1.hWnd
- Rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Option1."
- Case Option2.hWnd
- Rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Option2."
- Case Option3.hWnd
- Rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Option3."
- Case Combo1.hWnd
- Rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Combo1."
- Case Else
-
- End Select
- End Sub
-