How do I create shapes that I can click on (in vb.net)?
Posted on 2011-09-30
I am creating a touchscreen app, but the same appies for a mouse-clic I suppose.
I think I know the answer to this, but I don't like it, so I'm hoping for a solution.
I'm a bit math challenged, so I'm not sure even how to start to tackle this problem.
Let's say I wanted to have a honecomb pattern of buttons that are interlocked.
I know you can just put a square button behind a shape like a banana etc, but what if I want a honecomb shaped button exactly? It sounds like some complex math problem.
The only way I can think of doing this would be to create an table of X and Y positions I suppose of where each shape begins and ends horizontally and vertically like this:
Y axis table:
Pixel Start Pixel End Zone Name
5 100 Beep
Then I would send the mouse coordinates to look up the X and Y axis of the click to find
the zone name.
Is this the best I can do, or does .NET 4.0 have some other way of doing this that is much easier?