Results 1 to 4 of 4

Thread: Blank Picture box after Blitting

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982

    Talking Blank Picture box after Blitting

    I have a form with 2 picture boxes on.
    PictureBox1 loads a bmp file on load, on click of a command button the BitBlt function blits picturebox1 picture to picturebox2. The image does not display until the refresh method is executed for picturebox2.

    Picturebox2 has autoredraw set to true.

    I don't want to have to refresh if possible, is there any way around this.

    thanks


    Things I do when I am bored: DotNetable

  2. #2
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    If you have AutoRedraw set to True, you have to call Refresh, otherwise, how would it know when you're done updating and the new image needs to be shown?

    Why wouldn't you want refresh? It's a lot better than not using AutoRedraw and creating your own backbuffer, at least better in the sense of coding needed
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982
    I am using the BitBlt in a dll I am writing, using Refresh means I know the destination object, As this could be a form or a picturebox or some other object I want my dll to work irrespective of the object.

    For my dll to call refresh I have to know the objet otherwise I will have to rely on the programmer using the dll I am writing to call refresh on their chosen destination object.

    (I know what I mean)


    Things I do when I am bored: DotNetable

  4. #4
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    Passing the DC to the DLL I guess?


    Well, you could try WindowFromDC, then UpdateWindow, maybe that'll force a Refresh. Otherwise, you could try using a backbuffer and set AutoRedraw to False...
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

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