G Guest Jan 30, 2008 #1 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? Thanks in advance
A Armin Zingler Jan 30, 2008 #2 I need to upgrade from vb6 to dotnet. In vb6 I use Picture1.cls How do I upgrade this? Click to expand... 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? Click to expand... 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
H Herfried K. Wagner [MVP] Jan 31, 2008 #3 I need to upgrade from vb6 to dotnet. In vb6 I use Picture1.cls How do I upgrade this? Click to expand... 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 ///
I need to upgrade from vb6 to dotnet. In vb6 I use Picture1.cls How do I upgrade this? Click to expand... 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 ///