Log in

View Full Version : How do I "Reset" a PictureBox?


9hththt2
Mar 23, 2009, 02:24 PM
I'm compiling something on VB... But I can't figure out how to "reset" a picturebox, after printing on it. :confused:
Ex:

Private Sub Text1_Change()
Dim valor, contador, tb As Integer

If Val(Text1) <= 0 Then
(I need to "Reset" my picturebox here)
End If

valor = Val(Text1)
For contador = 1 To 10
tb = contador * valor
Picture1.Print valor & " X " & contador & " = " & tb
Next contador

End Sub

Perito
Mar 23, 2009, 06:28 PM
What version of VB?

Is this a .NET version or VB6 or earlier?

9hththt2
Mar 24, 2009, 12:44 PM
It's VB 6

Perito
Mar 24, 2009, 12:50 PM
Try this

Picture1.Cls

9hththt2
Mar 24, 2009, 01:19 PM
I have tried:

Me.Picture1.Picture = Nothing

and

Picture1.print = ""

It doesn't work. :(
It clears the picturebox.
But if I print again, the text doesn't appear in the beginning of the picturebox.
(the text printed appears as if I didn't clear the other)

9hththt2
Mar 24, 2009, 01:20 PM
Yay! Thank you so much :) It worked :D