J
John
I am a college student and somewhat new to VB.Net
I have programmed for years in VB6 and Java. I am converting a Java program
to VB.Net in Visual Studio 2008. It is a Windows Forms Application. A
board game with a grid of 93 hexagons as the board.
In Java, I used a polygon class to create the individual hexes on the board.
The Polygon class in Java has a boolean property, ".contains(x,y)", that
allows me to check if a mouse click occurs in the polygon.
My VB program currently uses a class to create the hexes and I have written
the "contains" property that works only for the hexagon shape I use (all 93
are the same shape).
What I am looking for is a "built in class" in VB.Net where I can define a
polygon area in my graphics drawing area and also have a "contains(x,y)"
property or equivalent to test if the mouse click(x,y) is in the polygon.
(I have looked at the vb.net Polygon class. It doesn't seem to work in a
Windows Forms Application. If I'm wrong and it does work, then I am failing
to set it up and need help.)
Any help would be appreciated. Thanks.
I have programmed for years in VB6 and Java. I am converting a Java program
to VB.Net in Visual Studio 2008. It is a Windows Forms Application. A
board game with a grid of 93 hexagons as the board.
In Java, I used a polygon class to create the individual hexes on the board.
The Polygon class in Java has a boolean property, ".contains(x,y)", that
allows me to check if a mouse click occurs in the polygon.
My VB program currently uses a class to create the hexes and I have written
the "contains" property that works only for the hexagon shape I use (all 93
are the same shape).
What I am looking for is a "built in class" in VB.Net where I can define a
polygon area in my graphics drawing area and also have a "contains(x,y)"
property or equivalent to test if the mouse click(x,y) is in the polygon.
(I have looked at the vb.net Polygon class. It doesn't seem to work in a
Windows Forms Application. If I'm wrong and it does work, then I am failing
to set it up and need help.)
Any help would be appreciated. Thanks.