Cannot remember name of tool (mapping?)

G

Guest

Help me out guys. Most of my work is db-oriented. I am not used to doing graphics.

I remember seeing a demo of a system that allowed the mapping of irregularly shaped areas (hotspots? mapping?) on a static image. These hot spots acted like controls or triggers. I just can't remember which technology it was in. Is there anything like that in VB.Net? (If I do anything at all with this, it will be in a Winforms app.)

Thanks.
 
C

Cor Ligthert

Hi B

A good newsgroup for what you ask is
microsoft.public.dotnet.framework.drawings

Maybe you find your answer quicker there?

Cor
I remember seeing a demo of a system that allowed the mapping of
irregularly shaped areas (hotspots? mapping?) on a static image. These hot
spots acted like controls or triggers. I just can't remember which
technology it was in. Is there anything like that in VB.Net? (If I do
anything at all with this, it will be in a Winforms app.)
 
H

Herfried K. Wagner [MVP]

* "=?Utf-8?B?Qi4gQ2hlcm5pY2s=?= said:
I remember seeing a demo of a system that allowed the mapping of
irregularly shaped areas (hotspots? mapping?) on a static image. These
hot spots acted like controls or triggers. I just can't remember which
technology it was in. Is there anything like that in VB.Net? (If I do
anything at all with this, it will be in a Winforms app.)

I am not sure what exactly you want to do, but you can create a region
of appropriate shape (from a 'GraphicsPath') and assign it to a
control's 'Region' property at runtime.

\\\
Imports System.Drawing.Drawing2D
..
..
..
Dim p As New GraphicsPath()
p.StartFigure()
p.AddArc(New Rectangle(0, 0, 40, 40), 180, 90)
p.AddLine(40, 0, Me.Width - 40, 0)
p.AddArc(New Rectangle(Me.Width - 40, 0, 40, 40), -90, 90)
p.AddLine(Me.Width, 40, Me.Width, Me.Height - 40)
p.AddArc(New Rectangle(Me.Width - 40, Me.Height - 40, 40, 40), 0, 90)
p.AddLine(Me.Width - 40, Me.Height, 40, Me.Height)
p.AddArc(New Rectangle(0, Me.Height - 40, 40, 40), 90, 90)
p.CloseFigure()
Me.UserControl1.Region = New Region(p)
Me.BackColor = Color.Red
p.Dispose()
///
 
C

Cor Ligthert

Hi Herfried,

I think you are almost there, now only the events for every part of the map.
(It is a standard HTML part as you probably know)

:)

Cor
 
H

Herfried K. Wagner [MVP]

* "Cor Ligthert said:
I think you are almost there, now only the events for every part of the map.
(It is a standard HTML part as you probably know)

I am not sure what you want to tell me. You can use mutliple controls
for the different parts of the map.

In HTML you could use an imagemap ('map', 'area').
 
C

Cor Ligthert

I am not sure what you want to tell me. You can use mutliple controls
for the different parts of the map.

In HTML you could use an imagemap ('map', 'area').

How do I get the right events when you click on your regions, because that
is the difficult part in my opinion.

(Do not take it serious)
:)

Cor
 
H

Herfried K. Wagner [MVP]

* "Cor Ligthert said:
How do I get the right events when you click on your regions, because that
is the difficult part in my opinion.

If you create controls and assign regions to it, you will still receive
events on "per region" basis.

Alternatively, you could store a list of regions and use their
'IsVisible' method to check if a point lies inside a specific region.
 
G

Guest

Thanks to everyone for the response. I will try the drawing forum.

(It is possible that I am thinking of an HTML technique. What I want to do is create multiple irregularly shaped areas at design time. It would be impractical to create a separate custom control for each area on the form.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top