Register for your free account! | Forgot your password?

You last visited: Today at 16:32

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[VB.Net] "D3D" Menu

Discussion on [VB.Net] "D3D" Menu within the Coding Tutorials forum part of the General Coding category.

Reply
 
Old   #1
 
Giommi's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 296
Received Thanks: 594
Arrow [VB.Net] "D3D" Menu

Hi Leute heute zeige ich euch wie man mit VB.Net ein D3D Menu Codet.

Wir beginnen mit der GUI:

Ihr braucht:
-9 Labels
-1 Timer
!Benennt es so wie im Pic!
!Hack1 Muss ForeColor auf Gold haben!!

Danach Doppelklick auf Form1:
Code:
Imports System.Runtime.InteropServices
über Public Class

Jetzt kommt eine Hook Protection:
Code:
#Region "Hook"

    Private Declare Sub keybd_event Lib "user32" ( _
    ByVal bVk As Byte, _
    ByVal bScan As Byte, _
    ByVal dwFlags As Integer, _
    ByVal dwExtraInfo As Integer)

    Private Const KEYEVENTF_KEYUP = &H2

    Private Delegate Function HOOKPROCDelegate( _
    ByVal nCode As Integer, _
    ByVal wParam As IntPtr, _
    ByRef lParam As KBDLLHOOKSTRUCT) As IntPtr

    
    Private HookProc As New HOOKPROCDelegate(AddressOf KeyboardHookProc)

    Private Declare Unicode Function GetModuleHandleW Lib "kernel32.dll" ( _
    ByVal lpModuleName As IntPtr) As IntPtr

    
    Private Declare Unicode Function SetWindowsHookExW Lib "user32.dll" ( _
    ByVal idHook As Integer, _
    ByVal lpfn As HOOKPROCDelegate, _
    ByVal hMod As IntPtr, _
    ByVal dwThreadId As UInteger) As IntPtr

    ' Für das Löschen des Hooks wird diese Funktion verwendet:
    Private Declare Unicode Function UnhookWindowsHookEx Lib "user32.dll" ( _
    ByVal hhk As IntPtr) As UInteger

    Private Declare Unicode Function CallNextHookEx Lib "user32.dll" ( _
    ByVal hhk As IntPtr, _
    ByVal nCode As Integer, _
    ByVal wParam As IntPtr, _
    ByRef lParam As KBDLLHOOKSTRUCT) As IntPtr

    Private Const WM_KEYDOWN As Int32 = &H100    ' Konstante für WM_KEYDOWN
    Private Const WM_KEYUP As Int32 = &H101      ' Konstante für WM_KEYUP
    Private Const HC_ACTION As Integer = 0       ' Konstante für HC_ACTION
    Private Const WH_KEYBOARD_LL As Integer = 13 ' Konstante für WH_KEYBOARD_LL

    Public PrevWndProc As Integer
    Private mHandle As IntPtr

    <StructLayout(LayoutKind.Sequential)> Public Structure KBDLLHOOKSTRUCT
        Public vkCode As Keys
        Public scanCode, flags, time, dwExtraInfo As UInteger

        Public Sub New(ByVal key As Keys, _
        ByVal scancod As UInteger, _
        ByVal flagss As UInteger, _
        ByVal zeit As UInteger, _
        ByVal extra As UInteger)

            vkCode = key
            scanCode = scancod
            flags = flagss
            time = zeit
            dwExtraInfo = extra
        End Sub
    End Structure

  
    Public Property KeyHookEnable() As Boolean
        Get
            Return mHandle <> IntPtr.Zero
        End Get
        Set(ByVal value As Boolean)
            If KeyHookEnable = value Then Return
            If value Then
                mHandle = SetWindowsHookExW(WH_KEYBOARD_LL, HookProc, _
                  GetModuleHandleW(IntPtr.Zero), 0)
            Else
                UnhookWindowsHookEx(mHandle)
                mHandle = IntPtr.Zero
            End If
        End Set
    End Property

    
    Private Function KeyboardHookProc(ByVal nCode As Integer, _
    ByVal wParam As IntPtr, _
    ByRef lParam As KBDLLHOOKSTRUCT) As IntPtr

        Dim fEatKeyStroke As Boolean

        If nCode = HC_ACTION Then

            fEatKeyStroke = Hook(lParam.vkCode)

           

            If fEatKeyStroke Then
                Return New IntPtr(1)
                Exit Function
            End If

            Return CallNextHookEx(mHandle, nCode, wParam, lParam)
        End If
    End Function

#End Region







    Dim DoubleHookProtect As Short = 1
So... Jetzt kommen wir zur Funktion des Hooks:
Code:
Private Function Hook(ByVal keyCode As Integer)

        
        If DoubleHookProtect = 1 Then
            DoubleHookProtect = 2
        Else
            DoubleHookProtect = 1
            Return False
        End If

        Select Case keyCode
Jetzt kommt das Menu mit den Pfeiltasten (Direkt unter Select Case):
Code:
Case Keys.Down

                If Hack1.ForeColor = Color.Gold Then
                    Hack1.ForeColor = Color.Black
                    Hack2.ForeColor = Color.Gold


                ElseIf Hack2.ForeColor = Color.Gold Then
                    Hack2.ForeColor = Color.Black
                    Hack3.ForeColor = Color.Gold

                ElseIf Hack3.ForeColor = Color.Gold Then
                    Hack3.ForeColor = Color.Black
                    Hack4.ForeColor = Color.Gold

                ElseIf Hack4.ForeColor = Color.Gold Then
                    Hack4.ForeColor = Color.Black
                    Hack1.ForeColor = Color.Gold
                End If


            Case Keys.Right

                If Hack1.ForeColor = Color.Gold Then
                    on1.Text = "On"
                    on1.ForeColor = Color.Green

                End If
                If Hack2.ForeColor = Color.Gold Then
                    on2.Text = "On"
                    on2.ForeColor = Color.Green
                End If
                If Hack3.ForeColor = Color.Gold Then
                    on3.Text = "On"
                    on3.ForeColor = Color.Green
                End If
                If Hack4.ForeColor = Color.Gold Then
                    on4.Text = "On"
                    on4.ForeColor = Color.Green
                End If

            Case Keys.Left

                If Hack1.ForeColor = Color.Gold Then
                    on1.Text = "Off"
                    on1.ForeColor = Color.Red

                ElseIf Hack2.ForeColor = Color.Gold Then
                    on2.Text = "Off"
                    on2.ForeColor = Color.Red

                ElseIf Hack3.ForeColor = Color.Gold Then
                    on3.Text = "Off"
                    on3.ForeColor = Color.Red

                ElseIf Hack4.ForeColor = Color.Gold Then
                    on4.Text = "Off"
                    on4.ForeColor = Color.Red
                End If

            Case Keys.Up

                If Hack2.ForeColor = Color.Gold Then
                    Hack2.ForeColor = Color.Black
                    Hack1.ForeColor = Color.Gold

                ElseIf Hack3.ForeColor = Color.Gold Then
                    Hack3.ForeColor = Color.Black
                    Hack2.ForeColor = Color.Gold

                ElseIf Hack4.ForeColor = Color.Gold Then
                    Hack4.ForeColor = Color.Black
                    Hack3.ForeColor = Color.Gold

                ElseIf Hack1.ForeColor = Color.Gold Then
                    Hack1.ForeColor = Color.Black
                    Hack4.ForeColor = Color.Gold
                End If
Und jetzt kann man die Form noch ein/aus blenden:
Code:
Case Keys.Delete
                Me.Hide()
            Case Keys.Insert
                Me.Show()
        End Select
        Return False
    End Function
Doppelklick auf Form1, dann unter Form_Load:
Code:
KeyHookEnable = True
        Me.TopMost = True
damit der Hook gestartet wird und dass das Programm immer zuoberst ist.

Für Hacks or sonstige Funktionen (Doppelklick Timer1):
Code:
If on1.Text = "On" Then
            'Die Funktion
           
        Else 'wenn on = off
            'Die Funktion
            
        End If


        If on2.Text = "On" Then
           'Die Funktion
            
        Else'wenn on = off
            'Die Funktion
            
        End If
'Die Funktion

        If on3.Text = "On" Then
            'Die Funktion
            
        Else'wenn on = off
              'Die Funktion                  
        End If


        If on4.Text = "On" Then
         'Die Funktion

        Else'wenn on = off
            'Die Funktion
        End If
Das "D3D" Menu habe ich selbst gecodet über ein Thanks würde ich mich freuen

Viel Spass
Greez Giommi
(Hook By Shawak!!!)
Giommi is offline  
Thanks
4 Users
Old 11/26/2011, 14:41   #2
 
elite*gold: 4
Join Date: Mar 2010
Posts: 3,148
Received Thanks: 1,535
Ich kapiers gerade nicht ganz. was macht das außer bunt?
Jopsi332 is offline  
Old 11/26/2011, 16:30   #3
 
Reeek's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 1,304
Received Thanks: 485
mh, leider nur schlecht bzw garnicht erklärt... eben nur ein Source. Kann damit aber vllt sogar was anfangen, also Thanks

€: doch kein Thanks - wo zur Hölle ist denn da bitteschön D3d? Das ist ne GUI mit Hook & TopMost
Reeek is offline  
Old 11/26/2011, 17:04   #4
 
XxharCs's Avatar
 
elite*gold: 34
Join Date: Apr 2011
Posts: 1,475
Received Thanks: 1,227
Ja ne Gui, wo du mit den pfeiltasten das ganze aktivierst/deaktivierst und bewegst. dabei ist es noch ein External window soviel ich sehe, und nicht direkt ingame window^^
XxharCs is offline  
Old 11/27/2011, 05:23   #5
 
Giommi's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 296
Received Thanks: 594
Quote:
Originally Posted by XxharCs View Post
Ja ne Gui, wo du mit den pfeiltasten das ganze aktivierst/deaktivierst und bewegst. dabei ist es noch ein External window soviel ich sehe, und nicht direkt ingame window^^
es ist eine "D3D" einfach mit VB und es ist keine Dll
Einfach nur ne GUI die man mit pfeiltasten ändern kann
(Was soll ne d3d sonst noch tun?)

Edit @ Reeek:Es hat einen Timer drinn...
If on1.Text = "on" than
....
Else
...

Das ist eigentlich die Funktion deiner D3D Hauptsächlich für Hacks.
Giommi is offline  
Old 11/27/2011, 12:54   #6
 
Reeek's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 1,304
Received Thanks: 485
D3D heißt direct3d und ist eine API von Microsoft. Du hast nur eine GUI verwendet. D3D-Menüs kann man mit einer .dll-injection in die Fenster anderer D3D-Spiele injizieren, GUIs eher nicht. Das ist der Unterschied
Reeek is offline  
Thanks
3 Users
Old 11/27/2011, 20:01   #7
 
elite*gold: 4
Join Date: Mar 2010
Posts: 3,148
Received Thanks: 1,535
ja so hatte ich das auch in erinnerung wie z.b. mit c++ und anttweakbar. das sah mir einfach nur wie ne form aus.
Jopsi332 is offline  
Old 11/27/2011, 20:35   #8
 
elite*gold: 14
The Black Market: 108/0/1
Join Date: May 2011
Posts: 2,671
Received Thanks: 818
Haha mit .Net kann man keine D3D Interfaces machen.

So tief kann man nur mit C++ in andere Programme eindringen.
Das ist eher ein "Overlay".
vwap is offline  
Thanks
2 Users
Old 11/30/2011, 19:39   #9
 
ZackBlack's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 334
Received Thanks: 79
Quote:
Originally Posted by Headpuster View Post
So tief kann man nur mit C++ in andere Programme eindringen.
Das ist eher ein "Overlay".
Scheint in auch in C# zu gehen: .
Hab das nur kurz überflogen (grad keine Zeit), da scheint aber auch ein bisschen C++ (und einige DLLs) verwendet zu werden.
ZackBlack is offline  
Old 12/01/2011, 17:53   #10
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,137
Received Thanks: 572
Quote:
Haha mit .Net kann man keine D3D Interfaces machen.

So tief kann man nur mit C++ in andere Programme eindringen.
Das ist eher ein "Overlay".
Doch kann man mit .Net kann man d3d verwenden, und man kann sowas mit weit mehr sprachen als nur c++ machen
warfley is offline  
Thanks
1 User
Old 01/04/2012, 20:27   #11
 
'xLeatz.'s Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 5,477
Received Thanks: 742
ich finds ned schlecht für Anfänger sicher gut
'xLeatz. is offline  
Old 01/05/2012, 16:51   #12


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,904
Received Thanks: 25,394
Quote:
Originally Posted by Reeek View Post
D3D heißt direct3d und ist eine API von Microsoft. Du hast nur eine GUI verwendet. D3D-Menüs kann man mit einer .dll-injection in die Fenster anderer D3D-Spiele injizieren, GUIs eher nicht. Das ist der Unterschied
Doch, GUIs kann man injizieren.

Quote:
Originally Posted by warfley View Post
Doch kann man mit .Net kann man d3d verwenden, und man kann sowas mit weit mehr sprachen als nur c++ machen
Du kannst aber ohne einen .NET Host keinen .NET Code in einem nativen Prozess ausführen, du musst den Hook also zumindest irgendwie über eine native Sprache laufen lassen und dann evtl. eine .NET Routine callen, die dann alles zeichnet.
MrSm!th is offline  
Thanks
1 User
Old 06/24/2012, 19:56   #13
 
elite*gold: 0
Join Date: Mar 2011
Posts: 301
Received Thanks: 159
ich versteh nicht ganz wo der Hook hin muss...
Acceus is offline  
Old 06/27/2012, 17:00   #14
 
DXStriker's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 194
Received Thanks: 86
Quote:
Originally Posted by Acceus View Post
ich versteh nicht ganz wo der Hook hin muss...
Meinst du jetzt die Funktion oder der startvorgang des hooks? Ich nehme eher an letzteres. Dieser wird , wie der threadersteller schon geschrieben hat in die "form1_load" kopiert. Wenn du nicht weißt was das ist würde ich mal anfangen die Basics zu lernen oder sie vielleicht mal aufzufrischen. Solltest du aber Die Funktion des hooks meinen ,platzierst du diese am besten unter dem load Event . Die Position davon spielt aber in der Regel keine Rolle!


MfG Dxstriker
DXStriker is offline  
Reply


Similar Threads Similar Threads
Kann mir bitte jemmand eine Hmachi HP erstellen """""SOS HELP""""
09/15/2010 - Metin2 Private Server - 11 Replies
SO wie der Titel schon sagt ich suche einen der mir per Teamviwer eine hp machen kann habe schon alles ausprobiert aber es klappt nie!!!! PLS HELP...



All times are GMT +2. The time now is 16:32.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.