[TUT] how to create a D3D menu in VB.Net

05/22/2015 20:05 yourib1999#1
Tools Needed:
-Visual Basic
-A Brain


First open Visual Basic
Make a new project > Win Form






[Only registered and activated users can see links. Click Here To Register...]




Rename Form1.vb to Loader.vb in Solution Explorer


Click on your form:
Settings > FormBorderStyle > None
Settings > Font > Opacity, 80%
Settings > ForeColor > DeepSkyBlue
Size > 182; 51


Lets start with the design..

Add:


- 1 Label
Settings > BackColor > Transparent
Settings > ForeColor> DeepSkyBlue
Settings > Text > Start the game now!

- 1 Label
Settings > BackColor > Transparent
Settings > ForeColor> DeepSkyBlue
Settings > Text > By Yourib1999

- 1 Timer

Then place them for it look like this

[Only registered and activated users can see links. Click Here To Register...]

Loader design is done

Lets make the d3d hack menu

Right click on you project in the Solution Explorer > Add New Windows Form > Name it D3D.vb

[Only registered and activated users can see links. Click Here To Register...]

do again

Click on your form:
Settings > FormBorderStyle > None
Settings > Font > Opacity, 80%
Settings > ForeColor > DeepSkyBlue
Size > 223; 193

Add:

- 1 Label
Settings > BackColor > Transparent
Settings > ForeColor> DeepSkyBlue
Settings > Text > <Your title> (i put for exempel Game D3D)

- 1 Label
Settings > BackColor > Transparent
Settings > ForeColor> DeepSkyBlue
Settings > Text > <Your Credits (& my if you will use it ;) )>

- 1 Label
Settings > BackColor > Transparent
Settings > ForeColor> White
Settings > Text > - Hack1
Settings > Name > item1

- 1 Label
Settings > BackColor > Transparent
Settings > ForeColor> Red
Settings > Text > [OFF]
Settings > Name > item1_off

- 1 Label
Settings > BackColor > Transparent
Settings > ForeColor> White
Settings > Text > - Hack2
Settings > Name > item2

- 1 Label
Settings > BackColor > Transparent
Settings > ForeColor> Red
Settings > Text > [OFF]
Settings > Name > item2_off

- 1 Label
Settings > BackColor > Transparent
Settings > ForeColor> White
Settings > Text > - Hack3
Settings > Name > item3

- 1 Label
Settings > BackColor > Transparent
Settings > ForeColor> Red
Settings > Text > [OFF]
Settings > Name > item3_off

- 1 Label
Settings > BackColor > Transparent
Settings > ForeColor> White
Settings > Text > -Hack5
Settings > Name > item4

- 1 Label
Settings > BackColor > Transparent
Settings > ForeColor> Red
Settings > Text > [OFF]
Settings > Name > item4_off

Then place them for it look like this
[Only registered and activated users can see links. Click Here To Register...]

D3D Menu design is done



Now lets go to the code part

right click on your form > view code

Add this code under Public Class D3D

Code:
Dim Hack1 As Integer = 0 'Hack1
Dim Hack2 As Integer = 0 'Hack2
Dim Hack3 As Integer = 0 'Hack3
Dim Hack4 As Integer = 0 'Hack4


Private Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Integer) As Integer
Its the hotkey function

then add this in following
Code:
Private Const SW_SHOWMAXIMIZED As Integer = 3
     Private Const SW_SHOWMINIMIZED As Integer = 2
     Private Const SW_SHOWNORMAL As Integer = 1


     Private Structure POINTAPI
         Public x As Integer
         Public y As Integer
     End Structure


     Private Structure RECT
         Public Left As Integer
         Public Top As Integer
         Public Right As Integer
         Public Bottom As Integer
     End Structure


     Private Structure WINDOWPLACEMENT
         Public Length As Integer
         Public flags As Integer
         Public showCmd As Integer
         Public ptMinPosition As POINTAPI
         Public ptMaxPosition As POINTAPI
         Public rcNormalPosition As RECT
     End Structure


     Private Declare Function GetWindowPlacement Lib "user32" (ByVal hwnd As IntPtr, ByRef lpwndpl As WINDOWPLACEMENT) As Integer
     Private Declare Function GetForegroundWindow Lib "user32" Alias "GetForegroundWindow" () As IntPtr


     Private Sub GetWindowStats(ByVal handle As IntPtr)
         Dim wp As WINDOWPLACEMENT
         wp.Length = System.Runtime.InteropServices.Marshal.SizeOf(wp)
         GetWindowPlacement(handle, wp)
         If wp.showCmd = SW_SHOWMAXIMIZED Then ' is window maximized?


             If handle = GetForegroundWindow Then ' is the window foreground?


             Else


             End If
         ElseIf wp.showCmd = SW_SHOWNORMAL Then
             If handle = GetForegroundWindow Then
                 Me.Visible = True
             Else




             End If
         ElseIf wp.showCmd = SW_SHOWMINIMIZED Then
             Me.Visible = False
         End If
     End Sub
Its the Windows State Check Function (to hide the menu when the game is minimized)


Now go back to your design form

And add 1 timer

Double click on it and add this

Code:
 GetWindowStats(Process.GetProcessesByName("game name")(0).MainWindowHandle) 'Check the game Windows State
         Catch ex As Exception 'if the game is not found
             Me.Visible = False 'Hide the hack
             Timer1.Stop()
             MsgBox("GAME NOT FOUND")
             Application.Exit() 'Close the Hack


         End Try
go back to your design form

And add 1 timer
Double click on it and add this

Code:
If GetKeyPress(Keys.Insert) Then 'Show the menu if Insert pressed & menu not visible
            If Me.Visible = True Then
                Me.Visible = False
                Timer1.Stop()
                Exit Sub
            End If
            If Me.Visible = False Then 'Hide the menu if Insert pressed & menu visible
                Me.Visible = True
                Timer1.Start()
                Exit Sub
            End If
        End If


        If GetKeyPress(Keys.Delete) Then 'Kill the menu
            Me.Close()
        End If


        '///////////////DOWN NAVIGATE///////////////////


        If GetKeyPress(Keys.Down) Then 'if we press Down key
            If item1.ForeColor = Color.DeepSkyBlue Then ' switch from item1 selected to item2
                item1.ForeColor = Color.White
                If item1_off.Text = "[OFF]" Then item1_off.ForeColor = Color.Red
                If item1_off.Text = "[ON]" Then item1_off.ForeColor = Color.LimeGreen
                item2.ForeColor = Color.DeepSkyBlue
                item2_off.ForeColor = Color.DeepSkyBlue
                Exit Sub
            End If


            If item2.ForeColor = Color.DeepSkyBlue Then ' switch from item2 selected to item3
                item2.ForeColor = Color.White
                If item2_off.Text = "[OFF]" Then item2_off.ForeColor = Color.Red
                If item2_off.Text = "[ON]" Then item2_off.ForeColor = Color.LimeGreen
                item3.ForeColor = Color.DeepSkyBlue
                item3_off.ForeColor = Color.DeepSkyBlue
                Exit Sub
            End If


            If item3.ForeColor = Color.DeepSkyBlue Then ' switch from item3 selected to item4
                item3.ForeColor = Color.White
                If item3_off.Text = "[OFF]" Then item3_off.ForeColor = Color.Red
                If item3_off.Text = "[ON]" Then item3_off.ForeColor = Color.LimeGreen
                item4.ForeColor = Color.DeepSkyBlue
                item4_off.ForeColor = Color.DeepSkyBlue
                Exit Sub
            End If


            If item4.ForeColor = Color.DeepSkyBlue Then ' switch from item4 selected to item1 
                item4.ForeColor = Color.White
                If item4_off.Text = "[OFF]" Then item4_off.ForeColor = Color.Red
                If item4_off.Text = "[ON]" Then item4_off.ForeColor = Color.LimeGreen
                item1.ForeColor = Color.DeepSkyBlue
                item1_off.ForeColor = Color.DeepSkyBlue
                Exit Sub
            End If
        End If


        '///////////////UP NAVIGATE///////////////////


        If GetKeyPress(Keys.Up) Then 'if we press Up key
            If item1.ForeColor = Color.DeepSkyBlue Then ' switch from item1 selected to item4
                item1.ForeColor = Color.White
                If item1_off.Text = "[OFF]" Then item1_off.ForeColor = Color.Red
                If item1_off.Text = "[ON]" Then item1_off.ForeColor = Color.LimeGreen
                item4.ForeColor = Color.DeepSkyBlue
                item4_off.ForeColor = Color.DeepSkyBlue
                Exit Sub
            End If


            If item2.ForeColor = Color.DeepSkyBlue Then ' switch from item2 selected to item1
                item2.ForeColor = Color.White
                If item2_off.Text = "[OFF]" Then item2_off.ForeColor = Color.Red
                If item2_off.Text = "[ON]" Then item2_off.ForeColor = Color.LimeGreen
                item1.ForeColor = Color.DeepSkyBlue
                item1_off.ForeColor = Color.DeepSkyBlue
                Exit Sub
            End If


            If item3.ForeColor = Color.DeepSkyBlue Then ' switch from item3 selected to item2
                item3.ForeColor = Color.White
                If item3_off.Text = "[OFF]" Then item3_off.ForeColor = Color.Red
                If item3_off.Text = "[ON]" Then item3_off.ForeColor = Color.LimeGreen
                item2.ForeColor = Color.DeepSkyBlue
                item2_off.ForeColor = Color.DeepSkyBlue
                Exit Sub
            End If


            If item4.ForeColor = Color.DeepSkyBlue Then ' switch from item4 selected to item3 
                item4.ForeColor = Color.White
                If item4_off.Text = "[OFF]" Then item4_off.ForeColor = Color.Red
                If item4_off.Text = "[ON]" Then item4_off.ForeColor = Color.LimeGreen
                item3.ForeColor = Color.DeepSkyBlue
                item3_off.ForeColor = Color.DeepSkyBlue
                Exit Sub
            End If
        End If
go back to your design form

Add 1 timer
Double click on it and add this

Code:
        '///////////////RIGHT = ACTIVE/////////////
        If GetKeyPress(Keys.Right) Then
            If item1.ForeColor = Color.DeepSkyBlue Then
                If item1_off.Text = "[OFF]" Then '----> if hack1 is off then turn it on
                    item1_off.Text = "[ON]"
                    Hack1 = 1 ' hack1 is activated (0 = OFF / 1 = ON)
                    Exit Sub
                End If
            End If

            If item2.ForeColor = Color.DeepSkyBlue Then
                If item2_off.Text = "[OFF]" Then '----> if hack2 is off then turn it on
                    item2_off.Text = "[ON]"
                    Hack2 = 1 ' hack2 is activated (0 = OFF / 1 = ON)
                    Exit Sub
                End If
            End If

            If item3.ForeColor = Color.DeepSkyBlue Then
                If item3_off.Text = "[OFF]" Then '----> if hack3 is off then turn it on
                    item3_off.Text = "[ON]"
                    Hack3 = 1 ' hack3 is activated (0 = OFF / 1 = ON)
                    Exit Sub
                End If
            End If

            If item4.ForeColor = Color.DeepSkyBlue Then
                If item4_off.Text = "[OFF]" Then '----> if hack4 is off then turn it on
                    item4_off.Text = "[ON]"
                    Hack4 = 1 ' hack4 is activated (0 = OFF / 1 = ON)
                    Exit Sub
                End If
            End If

        End If


        '///////////////RIGHT = ACTIVE/////////////
        If GetKeyPress(Keys.Left) Then
            If item1.ForeColor = Color.DeepSkyBlue Then
                item1_off.Text = "[OFF]"
                Hack1 = 0 ' hack1 is disactivate (0 = OFF / 1 = ON)
                Exit Sub
            End If

            If item2.ForeColor = Color.DeepSkyBlue Then
                item2_off.Text = "[OFF]"
                Hack2 = 0 ' hack2 is disactivate (0 = OFF / 1 = ON)
                Exit Sub
            End If

            If item3.ForeColor = Color.DeepSkyBlue Then
                item3_off.Text = "[OFF]"
                Hack3 = 0 ' hack3 is disactivate (0 = OFF / 1 = ON)
                Exit Sub
            End If

            If item4.ForeColor = Color.DeepSkyBlue Then
                item4_off.Text = "[OFF]"
                Hack4 = 0 ' hack4 is disactivate (0 = OFF / 1 = ON)
                Exit Sub
            End If
        End If
go back to your design form

Add 1 timer
Double click on it and add this

Code:
        Dim p As Process()
        p = Process.GetProcessesByName("Game") 'set The Game process
        If p.Count = 1 Then ' if the Game process detected

            If Hack1 = 1 Then
                                 'the hack code On
            Else
                                 'the hack code OFF
            End If

            If Hack2 = 1 Then
                                 'the hack code On
            Else
                                 'the hack code OFF
            End If

            If Hack3 = 1 Then
                                 'the hack code On
            Else
                                 'the hack code OFF
            End If

            If Hack4 = 1 Then
                                 'the hack code On
            Else
                                 'the hack code OFF
            End If

        Else

        End If

go back to your design form

Double click on your form ( in an empty space)
and add this code at form load code

Code:
Me.Hide()
         item1.ForeColor = Color.DeepSkyBlue
         item1_off.ForeColor = Color.DeepSkyBlue
         Try
             Interaction.AppActivate("game") 'example game process name without .exe
             Me.TopMost = True
         Catch
             Me.TopMost = True
         End Try
         Timer2.Start()
         Timer3.Start()
         Timer4.Start()
Now the Hack is done and ready

but you need to make it load with our loader (remember?)

So lets go back to it to finish

Right click on Loader.vb in your Solution Explorer > View code
then remove all ( Ctrl + a then delete)
and past this

Code:
Public Class Loader

    Private Sub Loader_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Timer1.Start()
    End Sub


    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim p As Process()
        p = Process.GetProcessesByName("game") 'set the game process
        If p.Count = 1 Then ' if game process detected

            Timer1.Stop()
            MsgBox("yourib1999's D3D Loaded")
            D3D.Show()
            Me.Hide()
            D3D.Hide()

        End If
    End Sub

End Class
And its done just generate your project
can edit application setting
Right click on your project in the Solution Explorer > Settings

when generated go to
MyDocuments>VisualStudio>Project>YourProject>Bin>R elease> your app

Run it as admin and start your game
then press insert for show your menu
and Delete to kill the D3D hack


if you use any of this please put credits, thank you
05/22/2015 23:59 Jeoni#2
Do you even know what d3d actually is?
This is just a plain windows forms menu with no form border and top most set, not rendered with d3d.
You should declare that or anybody will think that you have no idea and actually believe that this is d3d :D
What a ridiculous thought :)
With best regards
Jeoni
05/23/2015 00:36 Logtetsch#3
lol. step 1: open google; step 2: search for "visual basic d3d menu"; step 3: [Only registered and activated users can see links. Click Here To Register...]

Quote:
if you use any of this please put credits, thank you
[Only registered and activated users can see links. Click Here To Register...]
05/23/2015 13:23 Biesi#4
Does this even work? I mean, most D3D games aren't even rendered when there is another form in front
05/23/2015 14:08 snow#5
lol