Results 1 to 3 of 3

Thread: [RESOLVED] Picturebox .cls not working

  1. #1

    Thread Starter
    Hyperactive Member Krass's Avatar
    Join Date
    Aug 2000
    Location
    Montreal
    Posts
    489

    Resolved [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!
    Chris

  2. #2

    Thread Starter
    Hyperactive Member Krass's Avatar
    Join Date
    Aug 2000
    Location
    Montreal
    Posts
    489

    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.
    Chris

  3. #3
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: Picturebox .cls not working

    That is wasting memory, do it like so...

    Code:
    Picture1.Picture = Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width