Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Delphi] Showing form at .dll injection
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Fri Mar 21, 2008 10:45 am    Post subject: [Delphi] Showing form at .dll injection Reply with quote

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 Sad, the mouse dissapears, when its at the form, and my buttons dont registrate, when the mouse is over them Sad

can some1 please help me out at this?

Ty very much
~Anden100
Back to top
View user's profile Send private message
Renkokuken
GO Moderator
Reputation: 4

Joined: 22 Oct 2006
Posts: 3249

PostPosted: Fri Mar 21, 2008 10:59 am    Post subject: Reply with quote

CreateWindowEx()
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Fri Mar 21, 2008 11:31 am    Post subject: Reply with quote

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
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Fri Mar 21, 2008 12:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Fri Mar 21, 2008 12:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Fri Mar 21, 2008 1:16 pm    Post subject: Reply with quote

CreateThread() and open the form in that thread.
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Fri Mar 21, 2008 1:37 pm    Post subject: Reply with quote

Symbol wrote:
CreateThread() and open the form in that thread.


and... how exactly do you do that?
Back to top
View user's profile Send private message
slippppppppp
Grandmaster Cheater
Reputation: 0

Joined: 08 Aug 2006
Posts: 929

PostPosted: Fri Mar 21, 2008 11:32 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address MSN Messenger
Renkokuken
GO Moderator
Reputation: 4

Joined: 22 Oct 2006
Posts: 3249

PostPosted: Sat Mar 22, 2008 1:33 am    Post subject: Reply with quote

Renkokuken wrote:
CreateWindowEx()

CreateWindowEx

Example usage: Here.
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Sat Mar 22, 2008 3:50 am    Post subject: Reply with quote

But then he have to code the whole GUI instead simply draging buttons. Laughing
Coding the GUI is painful... Sad
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Sat Mar 22, 2008 4:20 am    Post subject: Reply with quote

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. Laughing
Coding the GUI is painful... Sad


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 Razz
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
View user's profile Send private message
Renkokuken
GO Moderator
Reputation: 4

Joined: 22 Oct 2006
Posts: 3249

PostPosted: Sat Mar 22, 2008 4:25 am    Post subject: Reply with quote

Symbol wrote:
But then he have to code the whole GUI instead simply draging buttons. Laughing
Coding the GUI is painful... Sad
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
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Sat Mar 22, 2008 5:06 am    Post subject: Reply with quote

Renkokuken wrote:
Symbol wrote:
But then he have to code the whole GUI instead simply draging buttons. Laughing
Coding the GUI is painful... Sad
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
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Sat Mar 22, 2008 5:08 am    Post subject: Reply with quote

If you prefer Drag-n-Drop, why don't you drag a timer from the "System" tab? Surprised
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Sat Mar 22, 2008 5:17 am    Post subject: Reply with quote

Symbol wrote:
If you prefer Drag-n-Drop, why don't you drag a timer from the "System" tab? Surprised


well... its pretty hard with the CreateWindowEx..., but i still dont get the CreateThread Sad
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites