[RESOLVED] Picturebox .cls not working
Here are 2 portions of code:
Code:
pic1.Print "Hello world"
pic1.Cls
This prints some text in the picturebox and clears it right after. Works good.
Code:
pic1.Print "Hello world"
pic1.Picture = pic1.Image
pic1.Cls
This prints some text and makes it consistent before trying to clear the picturebox. The problem with this is that the .Cls doesn't work. "Hello world" remains visible and I don't know how to clear it.
Would anyone have a suggestion of what to try? I wouldn't want to resort of retyping "Hello world" in white to make it disappear.
(I simplified things here... but some part of my code needs to makes the picturebox consistent (.picture = .image) so that's why I'm asking)
THANKS!
Re: Picturebox .cls not working
Nevermind.. sorry, guys. I found out how.
The following code will clear the picturebox
Code:
Pic1.Picture = LoadPicture()
I've been trying different ways for 1 hours, and I found the solution 5 minutes after posting my problem. Typically me.
Thanks.
Re: Picturebox .cls not working
That is wasting memory, do it like so...
Code:
Picture1.Picture = Nothing