Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Module1 - Holds Item Properties (PUBLIC for Form1)
- Module MenuItems
- Public Item1 As String = "WallHack;off"
- Public brushcoloritem1 As Brush = Brushes.White
- Public Item2 As String = "NoRecoil;off"
- Public brushcoloritem2 As Brush = Brushes.Red
- Public Item3 As String = "NoReload;off"
- Public brushcoloritem3 As Brush = Brushes.Red
- Public Item4 As String = "SpeedHack;off"
- Public brushcoloritem4 As Brush = Brushes.Red
- End Module
- Form1
- Public Class Form1
- Private Declare Function InvalidateRect Lib "user32" (ByVal hwnd As IntPtr, ByVal lpRect As IntPtr, ByVal bErase As Boolean) As Boolean
- Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As IntPtr) As IntPtr
- Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
- Dim MenuWidth As Integer = 365
- Dim MenuHeight As Integer = 125
- Dim MenuIndex As Integer = 1
- Dim MenuItemSpaces As Integer = 5
- Public selectedbrush As Brush = Brushes.White
- Public nonselectedbrush As Brush = Brushes.Red
- Private Sub update_menu()
- Dim TargetProcess As Process() = Process.GetProcessesByName("Crossfire")
- If TargetProcess.Length = 1 Then
- Else
- DrawMenuBorder(10, 10, Pens.Red, MenuWidth, MenuHeight)
- DrawTitle(10, 10, "LucasHeer715 Menu V1.0", Brushes.Red, 25)
- MenuItemSpaces += 40
- DrawString(10, MenuItemSpaces, Item1.Split(";")(0), brushcoloritem1, 15)
- DrawString(320, MenuItemSpaces, Item1.Split(";")(1), brushcoloritem1, 15)
- MenuItemSpaces += 20
- DrawString(10, MenuItemSpaces, Item2.Split(";")(0), brushcoloritem2, 15)
- DrawString(320, MenuItemSpaces, Item2.Split(";")(1), brushcoloritem2, 15)
- MenuItemSpaces += 20
- DrawString(10, MenuItemSpaces, Item3.Split(";")(0), brushcoloritem3, 15)
- DrawString(320, MenuItemSpaces, Item3.Split(";")(1), brushcoloritem3, 15)
- MenuItemSpaces += 20
- DrawString(10, MenuItemSpaces, Item4.Split(";")(0), brushcoloritem4, 15)
- DrawString(320, MenuItemSpaces, Item4.Split(";")(1), brushcoloritem4, 15)
- MenuItemSpaces = 5
- End If
- End Sub
- Private Sub DrawMenu_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DrawMenu.Tick
- update_menu()
- End Sub
- Private Sub DrawTitle(ByVal X As Integer, ByVal Y As Integer, ByVal TextI As String, ByVal brush As Brush, ByVal fontsize As Integer)
- Dim Crossfire As Graphics = Graphics.FromHwnd(New IntPtr(FindWindow("CrossFire", "CrossFire")))
- Dim MenuTitle As Font
- MenuTitle = New System.Drawing.Font("Times", fontsize, FontStyle.Regular)
- Crossfire.DrawString(TextI, MenuTitle, brush, X, Y)
- SetStyle(ControlStyles.OptimizedDoubleBuffer, True)
- DoubleBuffered = True
- Crossfire.Dispose()
- End Sub
- Private Sub DrawString(ByVal X As Integer, ByVal Y As Integer, ByVal TextI As String, ByVal brush As Brush, ByVal fontsize As Integer)
- Dim Crossfire As Graphics = Graphics.FromHwnd(New IntPtr(FindWindow("CrossFire", "CrossFire")))
- Dim MenuItem As Font
- MenuItem = New System.Drawing.Font("Times", fontsize, FontStyle.Regular)
- Crossfire.DrawString(TextI, MenuItem, brush, X, Y)
- SetStyle(ControlStyles.OptimizedDoubleBuffer, True)
- DoubleBuffered = True
- Crossfire.Dispose()
- End Sub
- Private Sub drawmenuinside(ByVal X As Integer, ByVal Y As Integer, ByVal Color As Brush, ByVal Width As Integer, ByVal Height As Integer)
- Dim Crossfire As Graphics = Graphics.FromHwnd(New IntPtr(FindWindow("CrossFire", "CrossFire")))
- Crossfire.FillRectangle(Color, X, Y, Width, Height)
- SetStyle(ControlStyles.OptimizedDoubleBuffer, True)
- DoubleBuffered = True
- Crossfire.Dispose()
- End Sub
- Private Sub DrawMenuBorder(ByVal X As Integer, ByVal Y As Integer, ByVal Color As Pen, ByVal Width As Integer, ByVal Height As Integer)
- Dim Crossfire As Graphics = Graphics.FromHwnd(New IntPtr(FindWindow("CrossFire", "CrossFire")))
- Crossfire.DrawRectangle(Color, X, Y, Width, Height)
- SetStyle(ControlStyles.OptimizedDoubleBuffer, True)
- DoubleBuffered = True
- Crossfire.Dispose()
- End Sub
- Private Sub Hotkeys_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Hotkeys.Tick
- Dim up As Boolean = False
- Dim down As Boolean = False
- Dim left As Boolean = False
- Dim right As Boolean = False
- up = GetAsyncKeyState(Keys.Up)
- down = GetAsyncKeyState(Keys.Down)
- left = GetAsyncKeyState(Keys.Left)
- right = GetAsyncKeyState(Keys.Right)
- If (up = True) Then
- If (MenuIndex = 1) Then
- Else
- MenuIndex -= 1
- End If
- System.Threading.Thread.Sleep(300)
- ElseIf (down = True) Then
- If (MenuIndex = 4) Then
- Else
- MenuIndex += 1
- End If
- System.Threading.Thread.Sleep(300)
- ElseIf (left = True) Then
- If (MenuIndex = 1) Then
- Item1 = "WallHack;off"
- ElseIf (MenuIndex = 2) Then
- Item2 = "NoRecoil;off"
- ElseIf (MenuIndex = 3) Then
- Item3 = "NoReload;off"
- ElseIf (MenuIndex = 4) Then
- Item4 = "SpeedHack;off"
- End If
- ElseIf (right = True) Then
- If (MenuIndex = 1) Then
- Item1 = "WallHack;on"
- ElseIf (MenuIndex = 2) Then
- Item2 = "NoRecoil;on"
- ElseIf (MenuIndex = 3) Then
- Item3 = "NoReload;on"
- ElseIf (MenuIndex = 4) Then
- Item4 = "SpeedHack;on"
- End If
- End If
- End Sub
- Private Sub SelectionChanged_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SelectionChanged.Tick
- If (MenuIndex = 1) Then
- brushcoloritem1 = selectedbrush
- brushcoloritem2 = nonselectedbrush
- brushcoloritem3 = nonselectedbrush
- brushcoloritem4 = nonselectedbrush
- ElseIf (MenuIndex = 2) Then
- brushcoloritem1 = nonselectedbrush
- brushcoloritem2 = selectedbrush
- brushcoloritem3 = nonselectedbrush
- brushcoloritem4 = nonselectedbrush
- ElseIf (MenuIndex = 3) Then
- brushcoloritem1 = nonselectedbrush
- brushcoloritem2 = nonselectedbrush
- brushcoloritem3 = selectedbrush
- brushcoloritem4 = nonselectedbrush
- ElseIf (MenuIndex = 4) Then
- brushcoloritem1 = nonselectedbrush
- brushcoloritem2 = nonselectedbrush
- brushcoloritem3 = nonselectedbrush
- brushcoloritem4 = selectedbrush
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment