Solved

Using an Image with Hotspots as the background of an MDI

Posted on 2001-07-25
10
221 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
Comment Utility
i would use transparent tshapes for this
0
 
LVL 3

Author Comment

by:Stefaan
Comment Utility
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
Comment Utility
well, sounds interesting, stefaan :-)
0
 
LVL 5

Expert Comment

by:Gwena
Comment Utility
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 33

Expert Comment

by:Slick812
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 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

15 Experts available now in Live!

Get 1:1 Help Now