frmmain.frm
来自「使用vb寫出完美網頁遊戲外掛的原始碼分享」· FRM 代码 · 共 705 行 · 第 1/2 页
FRM
705 行
Locked = -1 'True
TabIndex = 4
Text = "HP:"
Top = 60
Width = 270
End
Begin VB.TextBox txtChar
BackColor = &H8000000F&
BorderStyle = 0 'None
Height = 285
Left = 30
Locked = -1 'True
TabIndex = 10
Text = "Char:"
Top = 60
Width = 1965
End
Begin VB.TextBox Text3
BackColor = &H8000000F&
BorderStyle = 0 'None
Height = 285
Left = 3960
Locked = -1 'True
TabIndex = 11
Text = "MP:"
Top = 60
Width = 270
End
End
Begin MSComctlLib.StatusBar sbMain
Align = 2 'Align Bottom
Height = 285
Left = 0
TabIndex = 1
Top = 5805
Width = 10230
_ExtentX = 18045
_ExtentY = 503
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 3
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 1411
MinWidth = 1411
Text = "ygPlus"
TextSave = "ygPlus"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 4480
MinWidth = 4480
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 88194
MinWidth = 88194
EndProperty
EndProperty
End
Begin VbEclipse.ucPerspective ucMain
Height = 3525
Left = 0
TabIndex = 0
Top = 1080
Width = 6705
_ExtentX = 11827
_ExtentY = 6218
ViewCaptionIcons= 0 'False
End
Begin MSComctlLib.Toolbar tbMon
Align = 1 'Align Top
Height = 360
Left = 0
TabIndex = 3
Top = 720
Width = 10230
_ExtentX = 18045
_ExtentY = 635
ButtonWidth = 1138
ButtonHeight = 582
AllowCustomize = 0 'False
Appearance = 1
Style = 1
TextAlignment = 1
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 1
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 4
Object.Width = 7300
EndProperty
EndProperty
Begin VB.TextBox Text6
BackColor = &H8000000F&
BorderStyle = 0 'None
Height = 285
Left = 1740
Locked = -1 'True
TabIndex = 15
Text = "HP"
Top = 60
Width = 240
End
Begin ygPlus.vbalProgressBar vbalProgressBar4
Height = 225
Left = 2010
TabIndex = 14
Top = 60
Width = 1605
_ExtentX = 2831
_ExtentY = 397
Picture = "frmMain.frx":8456
ForeColor = 255
Appearance = 2
BarColor = 255
BarPicture = "frmMain.frx":87BA
BarPictureMode = 0
BackPictureMode = 0
Value = 50
ShowText = -1 'True
Text = "50%"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 222
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
XpStyle = -1 'True
End
Begin VB.TextBox txtTarget
BackColor = &H8000000F&
BorderStyle = 0 'None
Height = 285
Left = 0
TabIndex = 5
Text = "Target:"
Top = 90
Width = 1965
End
End
Begin VB.Menu mnfile
Caption = "&File"
End
Begin VB.Menu mntool
Caption = "&Tool"
End
Begin VB.Menu mnunpc
Caption = "&Window"
Begin VB.Menu mnudebug
Caption = "Debug"
End
Begin VB.Menu mnu1
Caption = "-"
End
Begin VB.Menu mnnpc
Caption = "NPC"
End
Begin VB.Menu mnuchat
Caption = "Chat"
End
Begin VB.Menu mnuinfo
Caption = "Info"
End
Begin VB.Menu mnuinv
Caption = "Inv"
End
Begin VB.Menu mnuitem
Caption = "Item"
End
Begin VB.Menu mnupeople
Caption = "People"
End
Begin VB.Menu mnuparty
Caption = "Party"
End
Begin VB.Menu mnumonster
Caption = "Monster"
End
Begin VB.Menu mnuskill
Caption = "Skill"
End
Begin VB.Menu mnustat
Caption = "Stat"
End
End
Begin VB.Menu mnhelp
Caption = "&Help"
End
Begin VB.Menu mnutask
Caption = "&task"
Visible = 0 'False
Begin VB.Menu mnushow
Caption = "Show"
Enabled = 0 'False
End
Begin VB.Menu mnu2
Caption = "-"
End
Begin VB.Menu mnuoptions
Caption = "Options"
End
Begin VB.Menu mnu3
Caption = "-"
End
Begin VB.Menu mnuexit
Caption = "Exit"
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public Sub btnConnect_Click()
Dim Check As Boolean
If (Trim(txtUser.Text) = "" Or Trim(txtPass.Text) = "" Or Trim(cbLocation.Text) = "") Then Exit Sub
If (btnConnect.Caption = "Connect") Then
Check = False
btnConnect.Caption = "Disconnect"
Constate = 0
AddAccount
Bot_Connect
Else
Check = True
btnConnect.Caption = "Connect"
frmBot.Winsock.Close
End If
txtUser.Enabled = Check
txtPass.Enabled = Check
cbLocation.Enabled = Check
cbServer.Enabled = Check
cbWorld.Enabled = Check
cbChar.Enabled = Check
End Sub
Private Sub cbLocation_Click()
Dim i As Integer
cbServer.Clear
For i = 1 To Location(cbLocation.ListIndex).Serv
cbServer.AddItem CStr(i)
Next
cbWorld.Clear
For i = 1 To 10
cbWorld.AddItem CStr(i)
Next
End Sub
Private Sub btnActive_Click()
If (btnActive.Caption = "Active") Then
'Check = False
btnActive.Caption = "InActive"
Else
'Check = True
btnActive.Caption = "Active"
End If
End Sub
Private Sub Form_Load()
ReDim tmppacket(0)
CreateStyle
Load_Account
Form_Resize
AddTray
End Sub
Public Sub Form_Resize()
On Error Resume Next
ucMain.Move ucMain.Left, ucMain.Top, Me.ScaleWidth, Me.ScaleHeight - (tbMon.Top + tbMon.Height) - sbMain.Height
ucMain.Refresh
End Sub
Private Sub Form_Unload(Cancel As Integer)
If MsgBox("Exit Yulgang Bot?", vbOKCancel, "Exit") = vbOK Then
ucMain.Terminate:
DelTray
End
Else
Cancel = 1
End If
End Sub
Private Sub mnuchat_Click()
frmMain.ucMain.ShowView ("Chat")
End Sub
Private Sub mnudebug_Click()
frmDebug.Visible = Not frmDebug.Visible
End Sub
Private Sub mnnpc_Click()
frmMain.ucMain.ShowView ("NPC")
End Sub
Private Sub mnuexit_Click()
Form_Unload 0
End Sub
Private Sub mnuinfo_Click()
frmMain.ucMain.ShowView ("Info")
End Sub
Private Sub mnuinv_Click()
frmMain.ucMain.ShowView ("Inv")
End Sub
Private Sub mnuitem_Click()
frmMain.ucMain.ShowView ("Item")
End Sub
Private Sub mnumonster_Click()
frmMain.ucMain.ShowView ("Mons")
End Sub
Private Sub mnuparty_Click()
frmMain.ucMain.ShowView ("Party")
End Sub
Private Sub mnupeople_Click()
frmMain.ucMain.ShowView ("People")
End Sub
Private Sub mnuskill_Click()
frmMain.ucMain.ShowView ("Skill")
End Sub
Private Sub mnustat_Click()
frmMain.ucMain.ShowView ("Stat")
End Sub
Private Sub TRAY_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
' On Error Resume Next
Dim Message As Long, SlockPass2 As String
Message = X / Screen.TwipsPerPixelX
Select Case Message
Case WM_LBUTTONDBLCLK
frmMain.Show
frmMain.Visible = True
frmMain.Visible = True
Case WM_RBUTTONDOWN
PopupMenu mnutask
End Select
End Sub
Private Sub ucMain_CloseView(ByVal ViewId As String, Cancel As Boolean)
If (ViewId = "Stat" Or ViewId = "Chat") Then MsgBox "Can't Close: " & ViewId, vbOKOnly, "Window": Cancel = True
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?