Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Using an Image with Hotspots as the background of an MDI

Posted on 2001-07-25
10
Medium Priority
?
233 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
9 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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
 
LVL 35

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 35

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 400 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

572 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