home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code2 / vb_msg / editbox.frm < prev    next >
Text File  |  1993-07-19  |  3KB  |  91 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Edit Box Demo"
  4.    Height          =   4305
  5.    Left            =   5280
  6.    LinkTopic       =   "Form1"
  7.    ScaleHeight     =   3900
  8.    ScaleWidth      =   5355
  9.    Top             =   3120
  10.    Width           =   5475
  11.    Begin PictureBox Picture1 
  12.       AutoSize        =   -1  'True
  13.       BorderStyle     =   0  'None
  14.       Height          =   720
  15.       Left            =   3810
  16.       Picture         =   EDITBOX.FRX:0000
  17.       ScaleHeight     =   720
  18.       ScaleWidth      =   720
  19.       TabIndex        =   4
  20.       Top             =   300
  21.       Visible         =   0   'False
  22.       Width           =   720
  23.    End
  24.    Begin VBMsg VBMsg1 
  25.       Height          =   420
  26.       Left            =   4350
  27.       MessageCount    =   EDITBOX.FRX:04FA
  28.       MessageList     =   EDITBOX.FRX:04FC
  29.       MessageTypes    =   0  'Selected Messages
  30.       PostDefault     =   0   'False
  31.       Top             =   3120
  32.       Width           =   420
  33.    End
  34.    Begin CommandButton Command1 
  35.       Caption         =   "Done"
  36.       Height          =   405
  37.       Left            =   2160
  38.       TabIndex        =   0
  39.       Top             =   3210
  40.       Width           =   1125
  41.    End
  42.    Begin TextBox Text1 
  43.       Height          =   435
  44.       Left            =   1890
  45.       TabIndex        =   1
  46.       Text            =   "Click Me!"
  47.       Top             =   1020
  48.       Width           =   2115
  49.    End
  50.    Begin Label Label2 
  51.       Caption         =   "This sample application shows you how to detect when the user clicks the right mouse button on an text box.  This is useful if you want to display help on particular controls that do not give you a Click event.  Click your right mouse button on the text box above and see."
  52.       Height          =   1125
  53.       Left            =   180
  54.       TabIndex        =   3
  55.       Top             =   1710
  56.       Width           =   4755
  57.    End
  58.    Begin Label Label1 
  59.       AutoSize        =   -1  'True
  60.       Caption         =   "Text Box ->"
  61.       Height          =   195
  62.       Left            =   660
  63.       TabIndex        =   2
  64.       Top             =   1110
  65.       Width           =   990
  66.    End
  67. End
  68. Option Explicit
  69. Declare Function GetDesktopHwnd Lib "User" () As Integer
  70.  
  71. Sub Command1_Click ()
  72.  
  73.     End
  74.  
  75. End Sub
  76.  
  77. Sub Form_Load ()
  78.  
  79.     Dim rc As Long
  80.     
  81.     VBMsg1.SubClasshWnd = Text1.hWnd
  82.  
  83. End Sub
  84.  
  85. Sub VBMsg1_WindowMessage (hWindow As Integer, Msg As Integer, wParam As Integer, lParam As Long, RetVal As Long, CallDefProc As Integer)
  86.     
  87.     Picture1.Visible = (Msg = VBMsg1.MessageList(0))    'True  = WM_RBUTTONDOWN
  88.                                                         'False = WM_RBUTTONUP
  89. End Sub
  90.  
  91.