Hello All,
In my windows form I have a picture-box PB1, and a button Bdraw. I want that
(1) when the form loads a rectangle is drawn on PB1
(2) later if the button Bdraw is pressed another rectangle is drawn.
The latter part (2) is ok, it works.
However I cannot get (1) to work.
The way I'm doing it is writting .....
Dim paper As Graphics
paper = PB1.CreateGraphics()
Dim mypen As Pen = New Pen(Color.Brown)
paper.DrawRectangle(mypen, 10, 10, 10, 10)
.... inside ->
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
<<here>>
End Sub
Why does this not work? And how can I get it to work.
Thanks,
SSB
In my windows form I have a picture-box PB1, and a button Bdraw. I want that
(1) when the form loads a rectangle is drawn on PB1
(2) later if the button Bdraw is pressed another rectangle is drawn.
The latter part (2) is ok, it works.
However I cannot get (1) to work.
The way I'm doing it is writting .....
Dim paper As Graphics
paper = PB1.CreateGraphics()
Dim mypen As Pen = New Pen(Color.Brown)
paper.DrawRectangle(mypen, 10, 10, 10, 10)
.... inside ->
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
<<here>>
End Sub
Why does this not work? And how can I get it to work.
Thanks,
SSB