Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / January 2006

Tip: Looking for answers? Try searching our database.

Hotspots in graphic

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nigel Stratton - 13 Jan 2006 12:53 GMT
I have an image that I would like to put in a Windows form. Similar to
http://www.wesolve-it.com/graphics/chassis.htm

The user should be able to click a part of the chassis and get custom
information about that part.

Two questions.
What is the best way to draw that image on the screen?
What is the best way to test for a hit on a certain part?

Do I use an image and create some kind of hot spot? Do I use the GDI to draw
the lines that represent that image? I want to create a business object
"Chassis" and I wanted to have that object communicate with the presentation
layer. Maybe to draw itself or at least respond to a request for information
about a certain part.

Thanks in advance
Light - 13 Jan 2006 18:24 GMT
If you create an overlay graphic wth different colors then coded to the
machine parts then that would be a possible solution.  You could also
use a single hit test color and divide the imagine up into multiple
layers -- ie each part.  That would be more extendable.

I'd also consider using an embedded HTML viewer and HTML or possibly
even Flash.
http://www.ghostclip.com
The Premier Help System For Developers
Light - 13 Jan 2006 19:01 GMT
If you create an overlay graphic wth different colors then coded to the
machine parts then that would be a possible solution.  You could also
use a single hit test color and divide the imagine up into multiple
layers -- ie each part.  That would be more extendable.

I'd also consider using an embedded HTML viewer and HTML or possibly
even Flash.
Curtis
http://www.ghostclip.com
The Premier Help System For Developers
Frank Hileman - 17 Jan 2006 21:19 GMT
I would not use flash for that. There is a product commonly used for these
types of applications. Each component would be a graphical object and they
take care of hit testing and mouse events.

http://www.vgdotnet.com

Regards,
Frank Hileman

>I have an image that I would like to put in a Windows form. Similar to
> http://www.wesolve-it.com/graphics/chassis.htm
[quoted text clipped - 16 lines]
>
> Thanks in advance
Bob Powell [MVP] - 18 Jan 2006 09:04 GMT
I've done this in the past using a bitmap upon which I placed blocks of a
specific colour for each link. You can get the mouse position from an image
displayed in a PictureBox and see what the colour is in the link-image using
GetPixel. Using a simple table you can determine which colour corresponds to
which link

Signature

Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

>I have an image that I would like to put in a Windows form. Similar to
> http://www.wesolve-it.com/graphics/chassis.htm
[quoted text clipped - 16 lines]
>
> Thanks in advance
Bob Powell [MVP] - 18 Jan 2006 09:04 GMT
I've done this in the past using a bitmap upon which I placed blocks of a
specific colour for each link. You can get the mouse position from an image
displayed in a PictureBox and see what the colour is in the link-image using
GetPixel. Using a simple table you can determine which colour corresponds to
which link

Signature

Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

>I have an image that I would like to put in a Windows form. Similar to
> http://www.wesolve-it.com/graphics/chassis.htm
[quoted text clipped - 16 lines]
>
> Thanks in advance

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.