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 


2 Delphi Questions

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Never Again
I post too much
Reputation: 0

Joined: 13 Jan 2007
Posts: 2000
Location: New Mexico

PostPosted: Sun Dec 02, 2007 11:38 pm    Post subject: 2 Delphi Questions Reply with quote

The first one is :
How can I change the picture of a Picture tool when my mouse is over it and when I click on it. I also need it to work when other people download my program but not take too much memory.

Second one is:
For some odd reason I can't figure out how to center the text in an Edit tool and I know this is really basic.

Thanks.
Back to top
View user's profile Send private message MSN Messenger
killersamurai
Expert Cheater
Reputation: 0

Joined: 10 Sep 2007
Posts: 197
Location: Colorado

PostPosted: Mon Dec 03, 2007 1:47 am    Post subject: Reply with quote

To change the picture when your mouse is over the TImage, you add a OnMouseMove event. For the mouse click, you can do either OnMouseUp or OnMouseDown event. I don't think you can align text in a TEdit unless you add that into the component. I would just use a TMemo and filter out the return(enter) key if you want to keep it one line.
Back to top
View user's profile Send private message
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Mon Dec 03, 2007 2:10 am    Post subject: Reply with quote

1. You need to send them the picture or add all the picture to your project(with .rc file).

2.I think it can't be done in delphi.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25788
Location: The netherlands

PostPosted: Mon Dec 03, 2007 7:13 am    Post subject: Reply with quote

2: Use a tmemo instead and set allignment to taCenter
and set wantreturns and wordwrap to false

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Never Again
I post too much
Reputation: 0

Joined: 13 Jan 2007
Posts: 2000
Location: New Mexico

PostPosted: Mon Dec 03, 2007 8:01 am    Post subject: Reply with quote

Thanks DB.

HolyBlah wrote:
1. You need to send them the picture or add all the picture to your project(with .rc file).

2.I think it can't be done in delphi.

How would I be able to put the pictures in an .rc?
Back to top
View user's profile Send private message MSN Messenger
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Mon Dec 03, 2007 8:35 am    Post subject: Reply with quote

Never Again wrote:
How would I be able to put the pictures in an .rc?


Make a blank .rc file. rc syntax is ID, ResourceType, Name. For example, if I want to put a bitmap called tomato in my project

Code:

IDTOMATO BITMAP "c:\tomato.bmp"


Suppose I named the rc data.rc, I would put the following directive in my project

Code:

{$R 'data.res' 'data.rc'} 


so data.rc is compiled to data.res and is linked with the other delphi object files. If you want to use the bitmap with functions like FindResource you then just put in FindResource(SysInit.HInstance, "IDTOMATO", RT_BITMAP);

_________________
Back to top
View user's profile Send private message
XxOsirisxX
Grandmaster Cheater Supreme
Reputation: 0

Joined: 30 Oct 2006
Posts: 1597

PostPosted: Mon Dec 03, 2007 11:55 am    Post subject: Reply with quote

or simply put 2 pictures, with 1 invisible.. then..

image2.visible := true;
image1.Visible := false;

can use a easy aling holding alt.

_________________

Back to top
View user's profile Send private message
Never Again
I post too much
Reputation: 0

Joined: 13 Jan 2007
Posts: 2000
Location: New Mexico

PostPosted: Mon Dec 03, 2007 4:58 pm    Post subject: Reply with quote

appalsap wrote:
Never Again wrote:
How would I be able to put the pictures in an .rc?


Make a blank .rc file. rc syntax is ID, ResourceType, Name. For example, if I want to put a bitmap called tomato in my project

Code:

IDTOMATO BITMAP "c:\tomato.bmp"


Suppose I named the rc data.rc, I would put the following directive in my project

Code:

{$R 'data.res' 'data.rc'} 


so data.rc is compiled to data.res and is linked with the other delphi object files. If you want to use the bitmap with functions like FindResource you then just put in FindResource(SysInit.HInstance, "IDTOMATO", RT_BITMAP);

When I made the .rc and tried to compile my project it said "[Error]Couldn't find data.res" how can I fix this?
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
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