View Single Post
  #1 (permalink)  
Old 05-02-2009, 8:00 PM
albundy albundy is offline
VB.NET Forum Newbie
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: May 2009
Posts: 3
Reputation: 0
albundy is on a distinguished programming path ahead
Default Drawstring string disappears when Button on Form

Hi,

I'm drawing a game board with GDI in VB2005. (it's like a gomoku board)
First i draw a background with FillRectangle, then I draw the grid with
DrawLine, then I draw some row and column letters with DrawString.
They are all in the Paint event of the Form.

Everything works fine, until i put some Buttons on the Form (not at runtime).
Then the column and row letters go behind the background rectangle (so they can't be seen ), when the form is shown. The grid remains on top of the background rectangle.

I would like the letters to stay on top of the other graphics.
Thanks in advance for the help
Reply With Quote