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 


Being able to drag form?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Thu Dec 06, 2012 2:39 pm    Post subject: Being able to drag form? Reply with quote

Hey,
How can i drag form from the background like.. i did BorderStyle to bsNone, and i want to drag it by pressing and holding the background.. how can i do it?

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Thu Dec 06, 2012 2:52 pm    Post subject: Reply with quote

add a mousedown event to the background object (picture, or form background itself. Can be multiple)
and then add in the code form_dragNow(formname)
now when you hold the mouse down the form will drag

_________________
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
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Thu Dec 06, 2012 2:55 pm    Post subject: Reply with quote

thank you!
_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
Onim
Newbie cheater
Reputation: 0

Joined: 02 Feb 2014
Posts: 18
Location: Malaysia

PostPosted: Tue Feb 04, 2014 4:48 am    Post subject: Reply with quote

Help. the code you give is not working. It's show Error: invalid class object.
_________________
From that day forth... my arm changed... and a voice echoed "Power! Give me more power!" and if I become a demon, so be it... I'll endure the exile... anything... to protect her!
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Tue Feb 04, 2014 4:54 am    Post subject: Reply with quote

you must give it the form, not a string

e.g form_dragNow(UDF1)

alternatively, UDF1.dragNow()



example.ct
 Description:

Download
 Filename:  example.ct
 Filesize:  439 Bytes
 Downloaded:  1008 Time(s)


_________________
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
Onim
Newbie cheater
Reputation: 0

Joined: 02 Feb 2014
Posts: 18
Location: Malaysia

PostPosted: Tue Feb 04, 2014 5:15 am    Post subject: Reply with quote

the code is:
Code:

function IMAGEMouseDown(sender, button, x, y)
IMAGE.dragNow()
end


where am i wrong?

_________________
From that day forth... my arm changed... and a voice echoed "Power! Give me more power!" and if I become a demon, so be it... I'll endure the exile... anything... to protect her!
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Tue Feb 04, 2014 5:29 am    Post subject: Reply with quote

it must be the formname
Not the object that you're dragging



example.ct
 Description:

Download
 Filename:  example.ct
 Filesize:  22.77 KB
 Downloaded:  902 Time(s)


_________________
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
Onim
Newbie cheater
Reputation: 0

Joined: 02 Feb 2014
Posts: 18
Location: Malaysia

PostPosted: Tue Feb 04, 2014 5:52 am    Post subject: Reply with quote

This is my code now and the CETrainer is the name of main form. No error but nothing happen when i drag it.
Code:

function FormMouseDown(sender, button, x, y)
   CETrainer.dragNow()
end

Edit:
Ahh!!! Your second attachment makes me clear. It's now working. Thanks Dark Byte. Very Happy

_________________
From that day forth... my arm changed... and a voice echoed "Power! Give me more power!" and if I become a demon, so be it... I'll endure the exile... anything... to protect her!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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