Solved

Using an Image with Hotspots as the background of an MDI

Posted on 2001-07-25
10
222 Views
Last Modified: 2010-04-04
Hi,

For our current project we have an MDI application.  Now the client requested some kind of image on the background of the MDI parent with different hotspots on which he can click.  Clicking on one of these hotsposts should do exactly the same as cliking on one of the toolbuttons or menu items ( same action should be executed ).

I was wondering if this is possible, and if so, how I could achieve this.  Any sample projects are always welcome.

Thanks a lot in advance,


Stefaan
0
Comment
Question by:Stefaan
  • 3
  • 2
  • 2
  • +2
10 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6317419
i would use transparent tshapes for this
0
 
LVL 3

Author Comment

by:Stefaan
ID: 6317527
Hi,

I didn't know a TShape has a transparent property ;-) Well for the moment I am trying to develop a custom TImage component in which I can define hotspot areas.  The TImage will have a collection of Hotspots on which can be clicked and for which the mouse cursor will change if you hove the mouse over the hotspot.

I will let you know if it has been successfull.

Best regards,


Stefaan
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6317559
well, sounds interesting, stefaan :-)
0
 
LVL 5

Expert Comment

by:Gwena
ID: 6318448
Maybe you could just put an image as the background and then by keeping track of where the mouse cursor is you could change the cursor and modify the onclick action for the image to do different things?  There is an active Q on EE now about keeping track of where the mouse cursor is :-)
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 33

Expert Comment

by:Slick812
ID: 6320688
It's easier (and it works) if you just put the TShape (as kretzschmar said) on a "HotSpot" and set the Brush style to bsClear and set the pen style to psClear (there is no "Transparent" property). Now set the Cursor for the TShape to HandPoint and set your "onClick" event in the OnMouseUp event of the TShape. I've done mouse move hotspot capture on components and it didn't seem worth the trouble compaired to the TShape use. But if you want to go your way, you might try Regions and do a HitTest.
0
 
LVL 33

Expert Comment

by:Slick812
ID: 6325570
Hello again, I had forgotten that I once used a TSpeedButton to do the Hotspot thing. Did you know That TspeedButton has a Transparent property ? ? ? Put the speed button over the HotSpot, Set the Transparent to True, and set Flat to True and the SpeedButton will vanish, until the mouse gets over it and it will only draw the button frame. It was very good for rectangular image hot spots. And you can change a caption if you need to.
0
 
LVL 3

Author Comment

by:Stefaan
ID: 6325753
Hi,

Well, just thought of it.  Dropping a TImage on a MDI parent form shows the image in design time, but apparently not at run time.  Any other ways I could put an image in the background of my MDI parent form ?

Once I can do that I have the solution to my problem, since I wrote a small MouseRegion component, which does everything I need.

Best regards,


Stefaan
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 100 total points
ID: 6327055
read article
http://www.nsonic.de/Delphi/txt_WIS00231.htm

or get the cooldev-controls at www.cooldev.com (comercial), but pretty good,
they have a component, which you drop on the paraent, assign a bitmap there and all is done

meikl ;-)
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 8733714
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

To accept kretzschmar's comment as answer

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Thank you,
Russell

EE Cleanup Volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi procedure  - Unsatisfied forward or external declaration. 2 142
delphi exception 7 63
Firemonkey webbrowser scrollbars ? 1 29
Dev express lookupcombo 3 13
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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 will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

867 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now