home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD67726142000.psc / frmColorSpyMnu.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-06-13  |  6.8 KB  |  207 lines

  1. VERSION 5.00
  2. Begin VB.Form Form2 
  3.    Caption         =   "Form2"
  4.    ClientHeight    =   3195
  5.    ClientLeft      =   165
  6.    ClientTop       =   735
  7.    ClientWidth     =   4680
  8.    LinkTopic       =   "Form2"
  9.    ScaleHeight     =   3195
  10.    ScaleWidth      =   4680
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.Menu mnuDoStuff 
  13.       Caption         =   "Do stuff"
  14.       Begin VB.Menu mnuWndFind 
  15.          Caption         =   "Find &Window"
  16.       End
  17.       Begin VB.Menu mnuSnapShot 
  18.          Caption         =   "Sa&ve Snapshot"
  19.       End
  20.       Begin VB.Menu mnuEnableDisable 
  21.          Caption         =   "Enable/ Disable"
  22.          Begin VB.Menu mnuEnable 
  23.             Caption         =   "Enable"
  24.          End
  25.          Begin VB.Menu mnuDisable 
  26.             Caption         =   "Disable"
  27.          End
  28.       End
  29.       Begin VB.Menu mnuSet 
  30.          Caption         =   "Set"
  31.          Begin VB.Menu mnuOnTopVals 
  32.             Caption         =   "On top values"
  33.             Begin VB.Menu mnuWinOnTop 
  34.                Caption         =   "Window on top"
  35.             End
  36.             Begin VB.Menu mnuWinNotOnTop 
  37.                Caption         =   "Window not on top"
  38.             End
  39.          End
  40.          Begin VB.Menu mnuZOrderPos 
  41.             Caption         =   "Z-Order position"
  42.             Begin VB.Menu mnuZTop 
  43.                Caption         =   "Top of Z-order"
  44.             End
  45.             Begin VB.Menu mnuZbottom 
  46.                Caption         =   "Bottom of Z-order"
  47.             End
  48.          End
  49.          Begin VB.Menu mnuChangeCText 
  50.             Caption         =   "Change control text"
  51.          End
  52.          Begin VB.Menu mnuChangeText 
  53.             Caption         =   "Change window text"
  54.          End
  55.       End
  56.       Begin VB.Menu mnuSendMessage 
  57.          Caption         =   "Send Message to window"
  58.          Begin VB.Menu mnuCreate 
  59.             Caption         =   "Create"
  60.          End
  61.          Begin VB.Menu mnuDestroy 
  62.             Caption         =   "Destroy"
  63.          End
  64.          Begin VB.Menu mnuClose 
  65.             Caption         =   "Close"
  66.          End
  67.          Begin VB.Menu mnuRefresh 
  68.             Caption         =   "Refresh"
  69.          End
  70.          Begin VB.Menu mnuClick 
  71.             Caption         =   "Click"
  72.             Begin VB.Menu mnuLeftClick 
  73.                Caption         =   "Left click"
  74.             End
  75.             Begin VB.Menu mnuLeftDblClick 
  76.                Caption         =   "Left click (double)"
  77.             End
  78.             Begin VB.Menu mnuRightClick 
  79.                Caption         =   "Right click"
  80.             End
  81.             Begin VB.Menu mnuRightDblClick 
  82.                Caption         =   "Right click (double)"
  83.             End
  84.          End
  85.       End
  86.       Begin VB.Menu mnuShowWindow 
  87.          Caption         =   "Show window"
  88.          Begin VB.Menu mnuHideWin 
  89.             Caption         =   "Hide window"
  90.          End
  91.          Begin VB.Menu mnuShowWin 
  92.             Caption         =   "Show window"
  93.          End
  94.          Begin VB.Menu mnuMinimize 
  95.             Caption         =   "Minimize"
  96.          End
  97.          Begin VB.Menu mnuMaximize 
  98.             Caption         =   "Maximize"
  99.          End
  100.          Begin VB.Menu mnuRestore 
  101.             Caption         =   "Restore"
  102.          End
  103.       End
  104.    End
  105. Attribute VB_Name = "Form2"
  106. Attribute VB_GlobalNameSpace = False
  107. Attribute VB_Creatable = False
  108. Attribute VB_PredeclaredId = True
  109. Attribute VB_Exposed = False
  110. Dim RetVal As Long
  111. Private Sub mnuChangeCText_Click()
  112.     Dim Input_ As String
  113.     NotOnTop Form1
  114.     Input_ = InputBox("Change control text to:", "Change window text", MainText)
  115.     OnTop Form1
  116.     Call SetWindowText(Win, Input_)
  117.     Call SendMessage(Win, WM_SETTEXT, ByVal CLng(0), ByVal Input_)
  118. End Sub
  119. Private Sub mnuChangeText_Click()
  120.     Dim Input_ As String
  121.     NotOnTop Form1
  122.     Input_ = InputBox("Change text to:", "Change window text", MainText)
  123.     OnTop Form1
  124.     Call SetWindowText(Win, Input_)
  125.     Call SendMessage(Win, WM_PAINT, 0&, 0&)
  126. End Sub
  127. Private Sub mnuClose_Click()
  128.     Call SendMessage(Win, WM_CLOSE, 0, 0)
  129. End Sub
  130. Private Sub mnuCreate_Click()
  131.     Call SendMessage(Win, WM_CREATE, 0&, 0&)
  132. End Sub
  133. Private Sub mnuDestroy_Click()
  134.     Call SendMessage(Win, WM_DESTROY, 0&, 0&)
  135. End Sub
  136. Private Sub mnuDisable_Click()
  137.     Call EnableWindow(Win, EW_DISABLE)
  138. End Sub
  139. Private Sub mnuEnable_Click()
  140.     Call EnableWindow(Win, EW_Enable)
  141. End Sub
  142. Private Sub mnuHideWin_Click()
  143.     Call ShowWindow(Win, SW_HIDE)
  144. End Sub
  145. Private Sub mnuLeftClick_Click()
  146.     Call PostMessage(Win, WM_LBUTTONDOWN, ByVal CLng(0), ByVal CLng(0))
  147.     Call PostMessage(Win, WM_LBUTTONUP, ByVal CLng(0), ByVal CLng(0))
  148. End Sub
  149. Private Sub mnuLeftDblClick_Click()
  150.    Call PostMessage(Win, WM_LBUTTONDBLCLK, ByVal CLng(0), ByVal CLng(0))
  151. End Sub
  152. Private Sub mnuMaximize_Click()
  153.     Call ShowWindow(Win, SW_MAXIMIZE)
  154. End Sub
  155. Private Sub mnuMinimize_Click()
  156.     Call ShowWindow(Win, SW_MINIMIZE)
  157. End Sub
  158. Private Sub mnuRefresh_Click()
  159.     Call SendMessage(Win, WM_PAINT, 0, 0)
  160. End Sub
  161. Private Sub mnuRestore_Click()
  162.     Call ShowWindow(Win, SW_RESTORE)
  163. End Sub
  164. Private Sub mnuRightClick_Click()
  165.     Call PostMessage(Win, WM_RBUTTONDOWN, ByVal CLng(0), ByVal CLng(0))
  166.     Call PostMessage(Win, WM_RBUTTONUP, ByVal CLng(0), ByVal CLng(0))
  167. End Sub
  168. Private Sub mnuRightDblClick_Click()
  169.     Call PostMessage(Win, WM_RBUTTONDBLCLK, ByVal CLng(0), ByVal CLng(0))
  170. End Sub
  171. Private Sub mnuShowWin_Click()
  172.     Call ShowWindow(Win, SW_SHOW)
  173. End Sub
  174. Private Sub mnuSnapShot_Click()
  175.     Dim SavePic As String
  176.             
  177.     Call GetWindowShot("ThunderRT6FormDC", Form1.Picture2)
  178.     'IMPORTANT!!!!-> 1st Param would be "ThunderRT5Form" for VB 5.  The snapshot will not work properly when the program is run in design-time.  Only in EXE form becuase the form changes its name from design-time to when it is an EXE.
  179.           
  180.     NotOnTop Form1
  181.     SavePic = InputBox("Save Snapshot As:", "Save Snapshot", App.Path & "\Snapshot.BMP")
  182.         
  183.     If Not InStr(1, SavePic$, ".Bmp", vbTextCompare) Then
  184.         SavePic = SavePic & ".Bmp"
  185.     End If
  186.         
  187.     OnTop Form1
  188.     Call SavePicture(Form1.Picture2.Image, SavePic)
  189. End Sub
  190. Private Sub mnuWinNotOnTop_Click()
  191.     Call SetWindowPos(Win, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_FLAGS)
  192. End Sub
  193. Private Sub mnuWinOnTop_Click()
  194.     Call SetWindowPos(Win, HWND_TOPMOST, 0, 0, 0, 0, SWP_FLAGS)
  195. End Sub
  196. Private Sub mnuWndFind_Click()
  197.     Seen = 1
  198.     Unload Form1
  199.     frmWindowFind.Show
  200. End Sub
  201. Private Sub mnuZbottom_Click()
  202.   Call SetWindowPos(Win, HWND_BOTTOM, 0, 0, 0, 0, SWP_FLAGS)
  203. End Sub
  204. Private Sub mnuZTop_Click()
  205.     Call SetWindowPos(Win, HWND_TOP, 0, 0, 0, 0, SWP_FLAGS)
  206. End Sub
  207.