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
    Posts
    3

    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?

    thanks,
    **** Roose

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    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
    http://www.philweber.com

    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
    Location
    Alameda, CA
    Posts
    1,737
    Use BitBlt instead of GetPixel
    Marco
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

Similar Threads

  1. Writing screen saver for NT
    By Darren in forum VB Classic
    Replies: 5
    Last Post: 04-09-2006, 12:08 PM
  2. screen problem on notebook Hp ze4560
    By grey goose in forum VB Classic
    Replies: 0
    Last Post: 08-04-2005, 02:25 AM
  3. function for copying a screen region
    By Amrita in forum C++
    Replies: 2
    Last Post: 07-12-2005, 11:49 AM
  4. Full screen image to hide flashy screen
    By David in forum VB Classic
    Replies: 1
    Last Post: 10-22-2000, 07:58 AM
  5. Writing screen saver for NT
    By Darren in forum VB Classic
    Replies: 0
    Last Post: 07-21-2000, 05: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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

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