Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
User Journal

Journal Quill_28's Journal: C# and Image Maps 2

If you wanted to make a map of Europe and when the user moved their mouse over or clicked on a country, a message box would appear.

How would you do this is C#?

I am most worried about detecting whether the mouse is over France or over Italy kind of thing.

Ideas?

This discussion has been archived. No new comments can be posted.

C# and Image Maps

Comments Filter:
  • This is really a WinForm question. I'm assuming windows form (heavy client) is what you want to build this with. If not, then obviously an image map on a HTML page is quite simple to do this.

    What you want is a HotSpot control. They are easy to make. You can base it off a button, and image, or make your own custom one and handle all the paint commands yourself.

    I did a quick google on ".net windows form hotspot" and found a pretty simple CodeProject project precisely on this:
    HotSpot [codeproject.com]

    Try that out, i think
    • I should also mention, that if this is a WinForm app your building, it's quite easy to 'embed' IE into the application, and have bi-directional communication between the embeded IE/html/javascript window and your host application (.net/c#). If you find yourself fighting against the rigors of a Forms application, this may be a better mix for you.
      In the case of embeding, you could use an image, and an image map over it, and have the image map url's be javascript which calls the callback to your host .net appl

And it should be the law: If you use the word `paradigm' without knowing what the dictionary says it means, you go to jail. No exceptions. -- David Jones

Working...