home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code2 / rt_mouse / generapp.frm (.txt) next >
Encoding:
Visual Basic Form  |  1992-03-16  |  9.5 KB  |  272 lines

  1. VERSION 2.00
  2. Begin Form Balloon_Form 
  3.    Caption         =   "RTMOUSE Test"
  4.    ClientHeight    =   5325
  5.    ClientLeft      =   1140
  6.    ClientTop       =   1035
  7.    ClientWidth     =   5085
  8.    ClipControls    =   0   'False
  9.    Height          =   6075
  10.    Left            =   1050
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   5325
  13.    ScaleWidth      =   5085
  14.    Top             =   375
  15.    Width           =   5265
  16.    Begin RtMouse RtMouse1 
  17.       BackColor       =   &H0000FFFF&
  18.       Prop13          =   -1  'True
  19.       Prop14          =   3  'Rounded
  20.       ForeColor       =   &H000000FF&
  21.       Prop12          =   0   'False
  22.       Left            =   2400
  23.       Top             =   3480
  24.    End
  25.    Begin CommandButton BTN_RTMouseStop 
  26.       Caption         =   "Stop RTM"
  27.       Height          =   375
  28.       Left            =   1920
  29.       TabIndex        =   15
  30.       Top             =   720
  31.       Width           =   1215
  32.    End
  33.    Begin CommandButton BTN_RTMouseStart 
  34.       Caption         =   "Start RTM"
  35.       Height          =   375
  36.       Left            =   240
  37.       TabIndex        =   14
  38.       Top             =   720
  39.       Width           =   1215
  40.    End
  41.    Begin ComboBox Combo1 
  42.       Height          =   300
  43.       Left            =   240
  44.       TabIndex        =   13
  45.       Text            =   "Combo1"
  46.       Top             =   2880
  47.       Width           =   2175
  48.    End
  49.    Begin OptionButton Option3 
  50.       Caption         =   "Maybe option"
  51.       Height          =   255
  52.       Left            =   1200
  53.       TabIndex        =   12
  54.       Top             =   4320
  55.       Width           =   1575
  56.    End
  57.    Begin PictureBox Picture1 
  58.       AutoSize        =   -1  'True
  59.       ClipControls    =   0   'False
  60.       Height          =   360
  61.       Left            =   360
  62.       Picture         =   GENERAPP.FRX:0000
  63.       ScaleHeight     =   330
  64.       ScaleWidth      =   360
  65.       TabIndex        =   11
  66.       Top             =   3600
  67.       Width           =   390
  68.    End
  69.    Begin CheckBox Check2 
  70.       Caption         =   "That"
  71.       Height          =   255
  72.       Left            =   1200
  73.       TabIndex        =   10
  74.       Top             =   3840
  75.       Width           =   1200
  76.    End
  77.    Begin CheckBox Check1 
  78.       Caption         =   "This"
  79.       Height          =   255
  80.       Left            =   1200
  81.       TabIndex        =   9
  82.       Top             =   3360
  83.       Width           =   1200
  84.    End
  85.    Begin Frame Frame1 
  86.       Caption         =   "Do it now"
  87.       Height          =   1215
  88.       Left            =   3000
  89.       TabIndex        =   6
  90.       Top             =   3120
  91.       Width           =   1695
  92.       Begin OptionButton Option2 
  93.          Caption         =   "No"
  94.          Height          =   255
  95.          Left            =   240
  96.          TabIndex        =   8
  97.          Top             =   720
  98.          Width           =   1000
  99.       End
  100.       Begin OptionButton Option1 
  101.          Caption         =   "Yes"
  102.          Height          =   255
  103.          Left            =   240
  104.          TabIndex        =   7
  105.          Top             =   360
  106.          Width           =   1000
  107.       End
  108.    End
  109.    Begin TextBox TXT_Result 
  110.       Height          =   375
  111.       Left            =   120
  112.       TabIndex        =   5
  113.       Text            =   "Status output"
  114.       Top             =   4800
  115.       Width           =   4815
  116.    End
  117.    Begin TextBox TXT_KeyString 
  118.       Height          =   375
  119.       Left            =   120
  120.       TabIndex        =   2
  121.       Text            =   "This is a popup message to display in the window. The message can be of long length, or it can be short."
  122.       Top             =   1560
  123.       Width           =   4815
  124.    End
  125.    Begin CommandButton BTN_Exit 
  126.       Caption         =   "Exit"
  127.       Height          =   375
  128.       Left            =   3600
  129.       TabIndex        =   1
  130.       Top             =   720
  131.       Width           =   1215
  132.    End
  133.    Begin TextBox TXT_SearchString 
  134.       Height          =   375
  135.       Left            =   120
  136.       TabIndex        =   0
  137.       Text            =   "Dawg"
  138.       Top             =   2280
  139.       Width           =   4815
  140.    End
  141.    Begin Label Label2 
  142.       Alignment       =   2  'Center
  143.       Caption         =   "Click ""Start RTM"" and Click the right mouse button on a control to display the popup balloon."
  144.       Height          =   375
  145.       Left            =   240
  146.       TabIndex        =   16
  147.       Top             =   120
  148.       Width           =   4575
  149.    End
  150.    Begin Label Label3 
  151.       Alignment       =   2  'Center
  152.       Caption         =   "Search String"
  153.       Height          =   255
  154.       Left            =   120
  155.       TabIndex        =   4
  156.       Top             =   2040
  157.       Width           =   4815
  158.    End
  159.    Begin Label Label1 
  160.       Alignment       =   2  'Center
  161.       Caption         =   "Key String"
  162.       Height          =   255
  163.       Left            =   120
  164.       TabIndex        =   3
  165.       Top             =   1320
  166.       Width           =   4815
  167.    End
  168.    Begin Menu nmu_File 
  169.       Caption         =   "&File"
  170.       Begin Menu mnu_Exit 
  171.          Caption         =   "&Exit"
  172.       End
  173.    End
  174.    Begin Menu mnu_Edit 
  175.       Caption         =   "&Edit"
  176.       Begin Menu mnu_Cut 
  177.          Caption         =   "Cu&t"
  178.       End
  179.       Begin Menu mnu_Copy 
  180.          Caption         =   "&Copy"
  181.       End
  182.       Begin Menu mnu_Paste 
  183.          Caption         =   "&Paste"
  184.       End
  185.       Begin Menu mnu_submenu 
  186.          Caption         =   "SubMenu"
  187.          Begin Menu mnu_submenu1 
  188.             Caption         =   "SubMenu 1"
  189.          End
  190.          Begin Menu mnu_submenu2 
  191.             Caption         =   "SubMenu 2"
  192.          End
  193.       End
  194.    End
  195.    Begin Menu mnu_help 
  196.       Caption         =   "&Help"
  197.       Begin Menu mnu_HelpBalloons 
  198.          Caption         =   "Help &Balloons"
  199.       End
  200.    End
  201. Option Explicit
  202. ' Declare statements for utility functions included in RTMOUSE.VBX
  203. Declare Function Hwnd2ControlTabIndex Lib "RTMOUSE.VBX" (ByVal hwndControl%) As Integer
  204. Declare Function Hwnd2CtlName Lib "RTMOUSE.VBX" (ByVal hwndControl%) As String
  205. Declare Function Hwnd2HelpContextID Lib "RTMOUSE.VBX" (ByVal hwndControl%) As Long
  206. Declare Function Hwnd2TagText Lib "RTMOUSE.VBX" (ByVal hwndControl%) As String
  207. Sub BTN_Exit_Click ()
  208.     mnu_Exit_Click
  209. End Sub
  210. Sub BTN_RTMouseStart_Click ()
  211.     rtmouse1.Action = 50 'start
  212. End Sub
  213. Sub BTN_RTMouseStop_Click ()
  214.     rtmouse1.Action = 51 ' stop
  215. End Sub
  216. Sub Form_Resize ()
  217.     If Me.WindowState = 0 Then
  218.         Me.Height = 6015
  219.         Me.Width = 5175
  220.         Me.Top = 0
  221.         Me.Left = 0
  222.     End If
  223. End Sub
  224. Sub mnu_Exit_Click ()
  225.     End
  226. End Sub
  227. Sub RtMouse1_RtMouseClick (hwndAtMouse As Integer)
  228. ' PURPOSE:  hwndAtMouse is the control the mouse is over
  229. ' COMMENTS: pass back the help text
  230. '           shows how to programmatcially end a session
  231. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  232. Dim Msg As String
  233. Dim CRLF As String
  234.     CRLF = Chr$(13) + Chr$(10)
  235.     ' use utility routines to retieve help text
  236.     TXT_Result.Text = Hwnd2CtlName(hwndAtMouse) + " ... hwndAtMouse = " + Hex$(hwndAtMouse)
  237.     Select Case hwndAtMouse
  238.         Case Me.hWnd
  239.             Exit Sub    ' do nothing
  240.         Case BTN_RTMouseStart.hWnd
  241.             rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control BTN_RTMouseStart."
  242.         Case BTN_RTMouseStop.hWnd
  243.             rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control BTN_RTMouseStop."
  244.         Case BTN_Exit.hWnd
  245.             rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control BTN_Exit."
  246.         Case TXT_KeyString.hWnd
  247.             rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control TXT_KeyString."
  248.         Case TXT_SearchString.hWnd
  249.             rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control TXT_SearchString."
  250.         Case TXT_Result.hWnd
  251.             rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control TXT_Result."
  252.         Case Picture1.hWnd
  253.             rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Picture1."
  254.         Case Check1.hWnd
  255.             rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Check1."
  256.         Case Check2.hWnd
  257.             rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Check2."
  258.         Case Frame1.hWnd
  259.             rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Frame1."
  260.         Case Option1.hWnd
  261.             rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Option1."
  262.         Case Option2.hWnd
  263.             rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Option2."
  264.         Case Option3.hWnd
  265.             rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Option3."
  266.         Case Combo1.hWnd
  267.             rtmouse1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Combo1."
  268.         Case Else
  269.         
  270.         End Select
  271. End Sub
  272.