Link to home
Start Free TrialLog in
Avatar of bfitch01
bfitch01

asked on

Visual Basic 6.0 Mouse_Over/Hover to display Graph information

Hello everyone,
We have a system written in Visual Basic 6.0.  On the splash screen there are two pie charts.  I've been given the task of setting the setting the form up so when you hover over a section of the pie chart with your mouse it will display the data for that slice of the pie.  Any idea how to do this?  It seems every other application/development tool has this built in but VB 6.

I appreciate any help or ideas you have.

bfitch01
Avatar of edwardiii
edwardiii

Hi, bfitch01.

You could use a picture boxes MouseDown event as shown at this EE post:

https://www.experts-exchange.com/questions/20422895/How-do-you-make-a-image-picture-box-like-html-image-map.html

Or, you could create an html page that mirrors the look of your splash screen (e.g. whatever text in addition to the two pie charts), and use image mapping to link to images/text that open in their own Web pages or as stand-alone images.  Then build a new splash page by filling a userform with a WebBrowser control, and setting BorderStyle to 0 (if desired).  Whenever users click on different sections of your new splash page, different data/images will popup.
SOLUTION
Avatar of edwardiii
edwardiii

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bfitch01

ASKER

These charts are updated daily.  It sounds like the X/Y solution will only be valid for a static chart.  Is my interpretation correct?
No. Why should that be?
Sorry, I meant, if you have the data that produces the charts then it should be easy, just a bit of trigonometry. It would be easier still if you
draw the pie charts straight into the picture boxes. Also, you could look up the colour of the pixel under the mouse pointer this could be used to get which slice you are over.
If you don't have the data then you may be stuffed.
Good questions regarding dynamic charts.  How are the charts added to the splash screen (e.g. what is the source of your charts)?
You basically need to build an Image map and calculate what pixels are within the regions.
They are built through a feed from SQL Server.  I figured out how to do it.  Thanks everyone for the help.