Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Visual Basic (https://www.askmehelpdesk.com/forumdisplay.php?f=469)
-   -   How do I "Reset" a PictureBox? (https://www.askmehelpdesk.com/showthread.php?t=332916)

  • Mar 23, 2009, 02:24 PM
    9hththt2
    How do I "Reset" a PictureBox?
    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
  • Mar 23, 2009, 06:28 PM
    Perito
    What version of VB?

    Is this a .NET version or VB6 or earlier?
  • Mar 24, 2009, 12:44 PM
    9hththt2

    It's VB 6
  • Mar 24, 2009, 12:50 PM
    Perito
    Try this

    Picture1.Cls
  • Mar 24, 2009, 01:19 PM
    9hththt2
    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)
  • Mar 24, 2009, 01:20 PM
    9hththt2
    Yay! Thank you so much :) It worked :D

  • All times are GMT -7. The time now is 12:06 AM.