getpixel tears the screen

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: getpixel tears the screen

  1. #1
    Join Date
    Nov 2005

    getpixel tears the screen

    I am trying to use the getPixel API to to get the color value of a pixel on the active screen. The code works fine for several minutes and then the screen goes all screwy and the program crashes. I have searched the net for any known problems with the getpixel API, but have not found any reference to the API crashing the program. If I copy the screen to a picture box, I don't have the problem, but it takes quite a long time to bitblt a screen to a picture box, more time than my program can stand.

    Does anyone know of this problem using getpixel? Is there a fix for it?

    Is there any way to sync the getpixel call with the screen refresh rate?

    **** Roose

  2. #2
    Join Date
    Nov 2003
    Portland, OR
    I have not heard of any problem with the GetPixel API. Can you post your declaration for the function and an example of how you're calling it?
    Phil Weber

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Nov 2003
    Alameda, CA
    Use BitBlt instead of GetPixel
    "There are two ways to write error-free programs. Only the third one works."

Similar Threads

  1. Writing screen saver for NT
    By Darren in forum VB Classic
    Replies: 5
    Last Post: 04-09-2006, 11:08 AM
  2. screen problem on notebook Hp ze4560
    By grey goose in forum VB Classic
    Replies: 0
    Last Post: 08-04-2005, 01:25 AM
  3. function for copying a screen region
    By Amrita in forum C++
    Replies: 2
    Last Post: 07-12-2005, 10:49 AM
  4. Full screen image to hide flashy screen
    By David in forum VB Classic
    Replies: 1
    Last Post: 10-22-2000, 06:58 AM
  5. Writing screen saver for NT
    By Darren in forum VB Classic
    Replies: 0
    Last Post: 07-21-2000, 04:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center