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 


correct disposal of images

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
fERO
How do I cheat?
Reputation: 0

Joined: 14 Dec 2011
Posts: 4

PostPosted: Sun Dec 25, 2011 11:35 am    Post subject: correct disposal of images Reply with quote

May be a question may seem silly to someone, but still, how to remove the image from a form?

load like this:

Code:

menuid_0 = createForm()                           
setProperty(menuid_0, "caption", "TITLE")         
setProperty(menuid_0, "Borderstyle", "bsSizeable")
control_setSize(menuid_0, 320, 240)               
form_centerScreen(menuid_0)

imgid_0 = createImage(menuid_0)
control_setAlign(imgid_0, alClient)             
image_stretch(imgid_0, true)
image_loadImageFromFile(imgid_0, [[C:\CEngine Projects\app_#1\pic1.bmp]])


this function, my attempt to delete an image, each time gives troubles..

Code:

function del_image()
 if imgid_0 ~= nil then
  objid_0 = object_getClassName(imgid_0)
  object_destroy(objid_0) -- or object_destroy(imgid_0) ???
  showMessage("clik!")
 end
end


Please give an example, delete the downloaded images at the touch of a button.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Sun Dec 25, 2011 11:48 am    Post subject: Reply with quote

Code:

object_destroy(imgid_0)

should work

_________________
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
fERO
How do I cheat?
Reputation: 0

Joined: 14 Dec 2011
Posts: 4

PostPosted: Sun Dec 25, 2011 11:56 am    Post subject: Reply with quote

tried it, even here right now I do it, but the image is why it is not then removed ..

UPD:

[s]may be more like a form of update to make it reset?[/s]

everything is OK. work, which was then named netakoy ..
Thenx
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 Lua Scripting 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