Results 1 to 4 of 4

Thread: (About GDI+) How to clear the image printed by Graphics.DrawImage()

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Posts
    4

    Question (About GDI+) How to clear the image printed by Graphics.DrawImage()

    How can I clear the image which is printed by the "Graphics.DrawImage()" on the form.
    Dim gra As Graphics
    gra = Me.CreateGraphics()
    Dim path As String
    path = "e:\test2.bmp"
    Dim picture As Image
    picture = New Bitmap(path)
    gra.DrawImage(picture, 0, 0)

    I just want to erase the picture(test2.bmp) on the form.
    And I dooooooon't want to use me.refresh(), because it's in a very low efficiency.

    please give me the right code! Thanks very much!

  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    Try Me.Invalidate and tell me its efficacy in comparison to Me.Refresh

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Posts
    4

    same

    the efficency is quite the same
    thank you anyway

  4. #4
    Hyperactive Member
    Join Date
    Feb 2002
    Posts
    261
    me.refresh seems pretty efficient on my system (1.4 GHz p4). I can easily refresh the form about 30 times a second while using .NET's built-in double buffering (the double buffering completely stops the flickering). I can refresh the form a lot faster if I disable the double buffering, but then it flickers way too much.
    Last edited by Hu Flung Dung; Mar 4th, 2003 at 04:15 PM.

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