DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  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, 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

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links