Results 1 to 5 of 5

Thread: GetPixel!!!!!!!!!!!!!!!!!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    355
    ok why doesnt GetPixel work half the time??
    most of the time it returns -1 !
    I've tried turning autoredraw (of the picbox im using) on and off, etc, and it still keeps returning -1 often. Sometimes it doesnt though ?)

    help!
    buzzwords are the language of fools

  2. #2
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ottawa,ON,Canada
    Posts
    217
    Code example, please.

  3. #3
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    Check your loops, you often get -1 if you go outside the area. This can happen if you hit the border of a form or if you have the form set to twips and loop to the edge of a control (in pixel count you'd be going way off the edge)

    chuck some of the data to the imediate window and see where you're "GET"ing


  4. #4
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    I noticed that GetPixel also returns -1 if stepping through the code with F8. Set your breakpoint after GetPixel if your debugging.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    355
    it works now I think, thanks
    buzzwords are the language of fools

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