Solved

Using an Image with Hotspots as the background of an MDI

Posted on 2001-07-25
10
223 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

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 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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 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