Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to bring to front image

Status
Not open for further replies.

mironto

Programmer
May 12, 2001
26
SK
I'd like to know how to change "layer" or position in z-axes of an image on form on run, if there are more that one image on it. is it possible, or can I change order only when composing the application through "Bring to front" and "Bring to back" commands?
 
its BringToFront and SendToBack. That is how you send something, an image in this case, to the front of the 'layers'. What do you mean by on run? Are you suggesting at runtime? What are you trying to do? If your loading images, and then sending them to the front, then try this:
Image1->Picture->LoadFromFile("myipc1.bmp");
Image1->BringToFront();

Is that what you wanted? If your wanting to execute code after a form is loaded, put it in a timer, and leave the timer enabled.
Does that answer your question at all? If your a little more specific on what you want to do, I can help you out more Cyprus
 
Thanks, you've understood what I want - to bring image to front at runtime. Can I get the order of images on form?
And one more thing:
I'm working on app "identikit" where you have different images like face, hair, eyes, etc. and you build portrait. I have there bitmaps with white background and image transparency set to true, so I can stack images one on anther. I wrote onclick events for images so I can choose image with mouse, but if one image is under transparent part of other image, I cannot choose it. Is there a way how to "ignnore" transparent parts of image and perform onclick on image under it (like in corel draw)?
(I hope I made myself clear...)
 
yes, let me work on it and get back to you tommorow. I do not currently have access to a computer with C++, so I cannot write up sample code for you that I could gaurentee would be correct. Ill give you some code soon, i promise! Cyprus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top