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 Point Setting

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Mon Jan 21, 2008 7:15 am    Post subject: Delphi Point Setting Reply with quote

I was just wondering how you can set a TPoint's X and Y

and also, how can you check the position, against say an ImageBox

like if
Code:
Image1.Left := Point.X then


but that doesn't work because it needs to be a boolean

any ideas?


Last edited by Snootae on Mon Jan 21, 2008 7:21 am; edited 3 times in total
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Mon Jan 21, 2008 7:20 am    Post subject: Reply with quote

Code:
var
Point: TPoint;


Edit:
Ohh, just noticed your edit.
You could just use Integers.

Code:
procedure TForm1.Button1Click(Sender: TObject);
var
X, y: Integer;
begin
x := 100;
y := 200;
Image1.Top := y;
Image1.Top := x;
end;


Edit2:
I just tried it out with TPoint, worked for me:
Code:
procedure TForm1.Button1Click(Sender: TObject);
var
Point: Tpoint;
begin
Point.X := 100;
Point.Y := 200;
Image1.Top := Point.X;
Image1.Top := Point.Y;
end;
Back to top
View user's profile Send private message
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Mon Jan 21, 2008 7:49 am    Post subject: Reply with quote

thanks, any idea about the ifing?
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: Mon Jan 21, 2008 7:59 am    Post subject: Reply with quote

well, first of all, to use "if" statment you need to use "if" Rolling Eyes

if Image1.Left = Position.X then ShowMessage('Oh noez');

in delphi, when using if, there's no ":", because := is for assignment and = is for comparing.
Back to top
View user's profile Send private message
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Mon Jan 21, 2008 8:58 am    Post subject: Reply with quote

ahh, just what i was looking for

GO Symbol!
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
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