Visual Basic Forum

Visual Basic Forum
für VB6 und VB.NET Programmierer
 
RegistrierenRegistrieren  LoginLogin

Neues Thema eröffnen   Neue Antwort erstellen    Visual Basic Forum Foren-Übersicht -> [VB6] Fragen - Antworten
Autor
Nachricht
ZiG_
Überflieger
Überflieger

Anmeldedatum: 07.03.2007
Beiträge: 1248

Game bot
Verfasst am: 29.03.2008, 21:24

Bräuchte mal kurz eure Hilfe.

Ein Kollege braucht paar Tipps oder links wo es um bots coden geht.
In Verbindung mit DirectX Games.

Hauptsächliches Problem ist ein Fenster im Vordergrund zu halten.
_________________
Wer nicht auf seine Weise denkt, denkt überhaupt nicht. (Oscar Wilde)
 
DIzzY_D2_
Newbie
Newbie

Anmeldedatum: 05.02.2008
Beiträge: 13


Verfasst am: 29.03.2008, 23:46

Probier ma das hier...
KP obs hift.

Code:

Declare Function SetWindowPos Lib "user32" _
            (ByVal hwnd As Long, _
            ByVal hWndInsertAfter As Long, _
            ByVal x As Long, _
            ByVal y As Long, _
            ByVal cx As Long, _
            ByVal cy As Long, _
            ByVal wFlags As Long) As Long

      Public Function SetTopMostWindow(hwnd As Long, Topmost As Boolean) _
         As Long

         If Topmost = True Then 'Make the window topmost
            SetTopMostWindow = SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, _
               0, FLAGS)
         Else
            SetTopMostWindow = SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, _
               0, 0, FLAGS)
            SetTopMostWindow = False
         End If
      End Function

_________________
 
Viktor
« Webmaster »<b><font color=red>« Webmaster »</fo



Anmeldedatum: 08.12.2006
Beiträge: 354
Wohnort: Berlin


Verfasst am: 30.03.2008, 00:43

Nett gemeint DIzzY_D2, aber du redest hier mit ZiG.
Wenn so einfach wäre hätte er wohl kaum gefragt Mr. Green
 
rene123_
Newbie
Newbie

Anmeldedatum: 15.02.2008
Beiträge: 14


Verfasst am: 30.03.2008, 08:41

Meinst du PixelBots oder einer der mit Packeten usw. arbeiten weil ich glaube für PixelBots und sowas ist Vb6 schlecht nimm dafür lieber AutoIt ist total easy
 
ZiG_
Überflieger
Überflieger

Anmeldedatum: 07.03.2007
Beiträge: 1248


Verfasst am: 30.03.2008, 16:57

Hmm, müßte ich nachfragen da es ja nicht für mich ist.
Aber ich werde den Tipp mal weiterreichen. Thx.
_________________
Wer nicht auf seine Weise denkt, denkt überhaupt nicht. (Oscar Wilde)
 
Bahamut_
« Moderator »<b><font color=green>« Moderator »</font



Anmeldedatum: 12.12.2006
Beiträge: 250


Verfasst am: 30.03.2008, 17:32

Wenn es hier um Fenster im Vordergrund halten bei DirectX-Spielen geht, kann ich dir sagen, dass es kompliziert wird.

In der Theorie is mir nur 1 Weg bekannt, in der Praxis garkeiner Xd

Die Idee ist, die d3d9.dll mit einer eignen zu überschrieben die dann als Tunnel zur echten d3d9.dll funktioniert. So läuft die Grafikanzeige immer durch die eigene dll und man kann das Bild ändern bevor es von der echten d3d9.dll zum Spiel gelangt.

Spiel <-> eigene d3d9.dll (die d3d9.dll ersetzt und nichts anders macht als die Kommunikation weiterleitet, aber auch manipuliert) <-> orginal d3d9.dll
_________________
VB.Net-Compiler: http://www.microsoft.com/germany/express/download/default.aspx
VB.Net-eBook: http://www.galileocomputing.de/openbook/visual_basic/
 
crusader727_
Tutorial Leser
Tutorial Leser

Anmeldedatum: 12.05.2007
Beiträge: 44


Verfasst am: 30.03.2008, 18:20

wie schon auf boredcoders geschrieben:

getestet mit cs 1.6

Code:
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Private Sub Form_Load()
    Me.Caption = "ich bin eine böse form"
    SetParent Me.hWnd, FindWindow(vbNullString, "Counter-Strike")
End Sub
 
ZiG_
Überflieger
Überflieger

Anmeldedatum: 07.03.2007
Beiträge: 1248


Verfasst am: 30.03.2008, 18:21

Hmm, klingt ja recht easy xD.
Naja. So denke ich wirds wohl nichts werden.

Also. Er meint er möchte ein Bild im Vordergrund anzeigen.
Gut, bei VB6 würde man das Bild auf einer Form platzieren, aber gibt es vielleicht ne Möglichkeit das iwie über DirectX Pixel für Pixel zu "zeichnen"?

Links zu iwelchen Boards die sich mit sowas beschäftigen wären sehr interessant. Dann kann er dort mal nachfragen.

mfg

@crusader727

Thx. Ganz vergessen auf boredcoders mal nachzusehen.
Werds mal weiterleiten.
_________________
Wer nicht auf seine Weise denkt, denkt überhaupt nicht. (Oscar Wilde)
 
c0re_
« Moderator »<b><font color=green>« Moderator »</font



Anmeldedatum: 28.11.2007
Beiträge: 425


Verfasst am: 30.03.2008, 18:32


Die selbe Frage habe ich mir auch vor Kurzem gestellt.
Das bekam ich als Antwort:

Zitat:
You wont be able to do it via DirectX with VB. To do it that way you need to inject a hook that will take over some of the DirectX calls the game uses. VB cannot do this without a hacked linker.

You'd need to move into another language like C/C++, ASM, Delphi, or so on.

Another method you could use it blitting it to the screen of the window. I've never done this method but I have seen others doing it.

Zitat:
Like I said, this is possible with a lot of custom mods to VB's linker and shit but it's not worth it. You can just learn another language, gain full benefits over what that language has to offer, and continue using that language for other projects that will pop into your head at a later time.

While I do still like VB6 as it was my first language so I do defend it when people bash it with little to no knowledge about it other then a bias opinion based on others, I do agree it is limited in ways. Some of the limitations it has can be bypassed if you use your brain. But it is just more work then needed most of the time.

Again, I will say, I suggest you move into another language if you want to do this. There are millions of free sources for this stuff on the net for various games like Counter-Strike and other HL mods.

A great site to get some info, tutorials, and so on from for this kind of stuff is GameDeception: http://www.gamedeception.net

Visual Basic ist also ungeeignet. Das mit der Form im Vordergrund währe eine Möglichkeit. Wenn man die Form komplett transparent hat und darauf das Bild platziert.
_________________
 
Neues Thema eröffnen   Neue Antwort erstellen    Visual Basic Forum Foren-Übersicht -> [VB6] Fragen - Antworten

Tags: directx game, directx games, bot, vordergrund, fenster

 
 Verwandte Themen   Aufrufe   Letzter Beitrag 
Keine neuen Beiträge Keygen - Hilfe bitte 1035 29.08.2007, 09:38
Keine neuen Beiträge Screenshot , hilfe ;) Speichern bzw jo 646 27.05.2007, 09:30
Keine neuen Beiträge hilfe bei ini maker 658 30.04.2007, 21:26
Keine neuen Beiträge [VB] suche hilfe beim 1. projekt 798 02.04.2007, 00:39
Keine neuen Beiträge proxy checker hilfe 929 30.03.2007, 09:21
 



[ Time: 0.3365s ][ Queries: 113 (0.0274s) ][ GZIP on - Debug on ]