Solved

Graphics question

Posted on 1998-04-28
6
144 Views
Last Modified: 2010-04-06
How can I display a bitmap on top of another bitmap and allow the user to drag and drop the first bitmap around.  I'd also like to attach text to the first bitmap  that would be visible all the time.
0
Comment
Question by:scott007
6 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1338729
Hi scott007,

007?

Maybe you could introduce a Z-order? e.g. Place your bitmaps in an array... array[0..1] ..

array[0] is bitmap one
array[1] is bitmap Two

Now you always know which one is behind the other.....

Regards, Zif.

0
 

Author Comment

by:scott007
ID: 1338730
Also, how can I tell which Bitmap is the one selected.  So far, I end up with one bitmap with many pictures on it...not many layered bitmaps.
0
 
LVL 4

Expert Comment

by:d003303
ID: 1338731
Yo,
where do you want the text to be ? Ontop of the bitmap, underneath ? Should the text be transparent ?
Because of the Z-order, you could also stick on the Z-order Windows provides with the creation order.

Slash/d003303
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:scott007
ID: 1338732
The text could be in different places on the bitmap and it should be transparent.  I'm not really sure what you mean by Z-order.  I'll have to look that up somewhere.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1338733
Z- Order ? Easy :

You've got an X and Y axis;

for 3D you've need an Z-Axis -> Z-ORDER.


0
 
LVL 1

Accepted Solution

by:
ssite earned 100 total points
ID: 1338734
You won't be able to do it with some coding. If you want an easy approach, then just use TImage and TLabel and set them up correctly.

Z-ORDER means who is above who. You can use the BringToFront/SendToBack methods to change the order of those controls.

However, if you want better performance, what you need to do is create a list in memory of records which can tell you the type of object, it's location, color ....
Then, use the paint event to walk through this array and pain the images yourself.
You just need to use standard windows API (GDI) functions.
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question