How do I upgrade Picture1.cls to dotnet?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to upgrade from vb6 to dotnet. In vb6 I use
Picture1.cls
How do I upgrade this?
Thanks in advance
 
I need to upgrade from vb6 to dotnet. In vb6 I use Picture1.cls
How do I upgrade this?

It depends. If you assigned an image to the Image property, assign
Nothing. If you paint anything in the Paint event (/onpaint), call
picture1.invalidate and stop painting in the paint event.


Armin
 
I need to upgrade from vb6 to dotnet. In vb6 I use
Picture1.cls
How do I upgrade this?


You can use the 'Clear' method of your 'Graphics' object.

\\\
Private m_Clear As Boolean

Public Sub OnPaint(ByVal e As PaintEventArgs)
If m_Clear Then
e.Graphics.Clear(Me.BackColor)
Else
e.Graphics.*
End If
End Sub

Private Sub Clear()
m_Clear = True
Me.Invalidate()
End Sub

Private Sub DrawAgain()
m_Clear = False
Me.Invalidate()
End Sub
///
 
Back
Top