A
Alejandro K.
First of all i know that this might be for the Drawing newsgroup but i
posted there and got no answers so.... let see if somebody here can help
me.
Hi , i got some problems using Paint event... the thing is that i got my
form divided in 2 using a splitter. the splitter divides 2 Panels that
are Docked to Fill
inside each panel i want to draw a small grey rectangle acting like
borders of the panel,it is working but if i move the Splitter sometimes
it does not refresh , or keeps drawing multiple lines without deleting
the previous ones.
Inside my Paint Event of my Panels i got the following code:
Private Sub PanMain_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles PanMain.Paint
ControlPaint.DrawBorder(e.Graphics, New Rectangle(1, 1,
PanMain.Width - 1, PanMain.Height - 1), Color.Gray,
ButtonBorderStyle.Solid)
End Sub
Private Sub PanScreen_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles PanScreen.Paint
e.Graphics.Flush()
ControlPaint.DrawBorder(e.Graphics, New Rectangle(1, 1,
PanScreen.Width - 1, PanScreen.Height - 1), Color.Gray,
ButtonBorderStyle.Solid)
End Sub
Thanks in advance for any kind of help.
Alex.
posted there and got no answers so.... let see if somebody here can help
me.
Hi , i got some problems using Paint event... the thing is that i got my
form divided in 2 using a splitter. the splitter divides 2 Panels that
are Docked to Fill
inside each panel i want to draw a small grey rectangle acting like
borders of the panel,it is working but if i move the Splitter sometimes
it does not refresh , or keeps drawing multiple lines without deleting
the previous ones.
Inside my Paint Event of my Panels i got the following code:
Private Sub PanMain_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles PanMain.Paint
ControlPaint.DrawBorder(e.Graphics, New Rectangle(1, 1,
PanMain.Width - 1, PanMain.Height - 1), Color.Gray,
ButtonBorderStyle.Solid)
End Sub
Private Sub PanScreen_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles PanScreen.Paint
e.Graphics.Flush()
ControlPaint.DrawBorder(e.Graphics, New Rectangle(1, 1,
PanScreen.Width - 1, PanScreen.Height - 1), Color.Gray,
ButtonBorderStyle.Solid)
End Sub
Thanks in advance for any kind of help.
Alex.