Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Using an Image with Hotspots as the background of an MDI

Posted on 2001-07-25
10
Medium Priority
?
230 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 34

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 34

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

688 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