I am a novice hobby programmer using VB.net Express 2008. I have a problem that has haunted me for years and I have not been able to get a simple laymenís answer to it as of yet. Perhaps there is not a simple answer.
Years ago I made a nice slot machine using VB6. I switched to VB.net in 2003 and tried to program an improved version and found I couldnít even create my old game. The problem was drawing a line on top of other controls.
The slot machine consisted of 9 square picture boxes placed 3x3 to form a typical 9 box square slot interface. When 3 of the same images lined up in a straight row, a line would draw on top of all the winning picture boxes, just like a normal slot machine would, to let you know where the win is. In total there are 8 lines: 3 horizontal from left to right, 3 vertical from top to bottom and 2 diagonal one from top left to bottom right and one from bottom left to top right.
In VB6 drawing a line on top of other controls was simple as there was a basic shape control which allowed you to draw lines on any control anywhere on the form. In VB.net I have no idea how to draw lines on top of another control. Now I am sure there are many ways but they are probably above and beyond my current skill level.
One simple work-around I thought of would be to place a large picture box on top of the nine slot picture boxes. I would then use several line icons (gif, tiff with a no background) to create the illusion of the line being drawn on top of the winning picture boxes. My problem is that there does not seem to be a true transparent setting for the picturebox control. The picturebox always shows a component of background. Transparency just sets the back color to the same as the formís.
I have not used GDI+ too much and have never used WPF, so if the answer is to use either, please explain it with that in mind. I appreciate anyone taking the time to read this and apologize if you got lost in the explanation. I would greatly appreciate any and all help.
This post has been edited by Marzguitarz: 22 February 2009 - 01:26 PM