Error of Randomly clearing PictureBox

2»

Comments

  • seancampbellseancampbell Pennsylvania, USA
    : : Ok. It was driving me nuts that I didn't know what was going on, so
    : : I went and figured out what was going on...
    : :
    :
    : I just punched in your code and it works great!
    : [b]Thank you for your trouble.[/b] I will study the changes you
    : made. Several programs I have planned will require similar treatment.
    :
    : Happy coding all.
    :

    If you have any questions about it, let me know. Pretty much it is exactly the same as yours, I just changed a couple if statements to use different Operators (If not GetPixel.Equals(Color) instead of <> operator) and made the doMain subroutine not enable and disable the timer rapidly (that could cause some funny problems, and possibly slow down the program).

    The biggest thing is the Bitmap image that I am editting and setting Picturebox1.image equal to...

    Glad we could help!!!
    -Sean C.
  • Here's a question!
    This code puts a Bitmap Image into a PictureBox
    [code]PictureBox1.BackgroundImage = bitmap[/code]
    Is there a similar,quick, simple way of copying an Image from a PictureBox into a Bitmap?
  • seancampbellseancampbell Pennsylvania, USA
    : Here's a question!
    : This code puts a Bitmap Image into a PictureBox
    : [code]: PictureBox1.BackgroundImage = bitmap[/code]:
    : Is there a similar,quick, simple way of copying an Image from a
    : PictureBox into a Bitmap?
    :

    Dim BMP as Bitmap = PictureBox1.Image

    That should work, but when you do a PictureBox.CreateGraphics() it doesn't draw onto the image, it draws onto the object itself, that was why it wasn't redrawing when the form invalidated.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories