| View previous topic :: View next topic |
| Author |
Message |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Fri Mar 21, 2008 10:45 am Post subject: [Delphi] Showing form at .dll injection |
|
|
Hi all pro' delphi users
I could need some help, at showing the form i got inside my .dll, when i inject the .dll
ive tryed this:
| Quote: | Form1:= TForm1.Create(nil);
Form1.Show; |
But it wont work correctly , the mouse dissapears, when its at the form, and my buttons dont registrate, when the mouse is over them
can some1 please help me out at this?
Ty very much
~Anden100
|
|
| Back to top |
|
 |
Renkokuken GO Moderator
Reputation: 4
Joined: 22 Oct 2006 Posts: 3249
|
Posted: Fri Mar 21, 2008 10:59 am Post subject: |
|
|
| CreateWindowEx()
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Fri Mar 21, 2008 11:31 am Post subject: |
|
|
| i could need an example on that one O.o, ive googled, and get a crap load of examples, on "Reducing the size of your exe", but all i need, is to show a form!!!
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Fri Mar 21, 2008 12:44 pm Post subject: |
|
|
You have to process the messages, delphi does that automatically, but its a loop, so you have to create the form in another thread or else it will never return from the function that opened it.
Another thread for the message loop should solve the problem.
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Fri Mar 21, 2008 12:56 pm Post subject: |
|
|
| Symbol wrote: | You have to process the messages, delphi does that automatically, but its a loop, so you have to create the form in another thread or else it will never return from the function that opened it.
Another thread for the message loop should solve the problem. |
Hmmm... could any1 please translate that into english???
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Fri Mar 21, 2008 1:16 pm Post subject: |
|
|
| CreateThread() and open the form in that thread.
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Fri Mar 21, 2008 1:37 pm Post subject: |
|
|
| Symbol wrote: | | CreateThread() and open the form in that thread. |
and... how exactly do you do that?
|
|
| Back to top |
|
 |
slippppppppp Grandmaster Cheater
Reputation: 0
Joined: 08 Aug 2006 Posts: 929
|
Posted: Fri Mar 21, 2008 11:32 pm Post subject: |
|
|
Look, have a procedure that does this :
Procedure showform;
begin
Form1.create(self);
Form1.show;
Form1.free;
end;
CreateThread(NIL, NIL, showform, NIL, NIL, NIL);
|
|
| Back to top |
|
 |
Renkokuken GO Moderator
Reputation: 4
Joined: 22 Oct 2006 Posts: 3249
|
Posted: Sat Mar 22, 2008 1:33 am Post subject: |
|
|
| Renkokuken wrote: | | CreateWindowEx() |
CreateWindowEx
Example usage: Here.
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Sat Mar 22, 2008 3:50 am Post subject: |
|
|
But then he have to code the whole GUI instead simply draging buttons.
Coding the GUI is painful...
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Sat Mar 22, 2008 4:20 am Post subject: |
|
|
| slippppppppp wrote: | Look, have a procedure that does this :
Procedure showform;
begin
Form1.create(self);
Form1.show;
Form1.free;
end;
CreateThread(NIL, NIL, showform, NIL, NIL, NIL); |
im pretty sure that that code wont work o.o...
| Symbol wrote: | But then he have to code the whole GUI instead simply draging buttons.
Coding the GUI is painful...  |
Im making a Bot for MS, much like lBot, so i guess, its going to be hardt, to code the timers O.o... well.. i think i might give it a try
Edit: to lazy... Made half of the checkboxes, some labels, and then it got to booring, i dont even know how to do the timer stuff...
Last edited by Anden100 on Sat Mar 22, 2008 5:04 am; edited 1 time in total |
|
| Back to top |
|
 |
Renkokuken GO Moderator
Reputation: 4
Joined: 22 Oct 2006 Posts: 3249
|
Posted: Sat Mar 22, 2008 4:25 am Post subject: |
|
|
| Symbol wrote: | But then he have to code the whole GUI instead simply draging buttons.
Coding the GUI is painful...  | Complete control is supplied with creating and handling the window yourself.
Better he learn now before he becomes too adapted to the entire drag-and-drop concept.
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Sat Mar 22, 2008 5:06 am Post subject: |
|
|
| Renkokuken wrote: | | Symbol wrote: | But then he have to code the whole GUI instead simply draging buttons.
Coding the GUI is painful...  | Complete control is supplied with creating and handling the window yourself.
Better he learn now before he becomes too adapted to the entire drag-and-drop concept. |
its waaaaay to booring... i prefer the "drag-n-drop" method..., could you please tell me, how to make a timer???...
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Sat Mar 22, 2008 5:08 am Post subject: |
|
|
If you prefer Drag-n-Drop, why don't you drag a timer from the "System" tab?
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Sat Mar 22, 2008 5:17 am Post subject: |
|
|
| Symbol wrote: | If you prefer Drag-n-Drop, why don't you drag a timer from the "System" tab?  |
well... its pretty hard with the CreateWindowEx..., but i still dont get the CreateThread
|
|
| Back to top |
|
 |
|