Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pixel Colour

Status
Not open for further replies.

gareth1

Programmer
Mar 16, 2000
9
0
0
GB
I'm coding in Visual Basic V6 and am trying to get the colour of any pixel I specify on the screen.&nbsp;&nbsp;It's been suggested that I ask you guys if you have a routine that can talk to the graphics card for me and return the colour.<br><br>Any help?
 
As far as I know, for vga mode, all pixel data is stored from 0xa000:0x0000 to 0xa000:0xFA00<br><br>each pixel is a byte since it's at 256 color depth<br><br>But this is only for vga mode, maybe this is somehow related to other modes. I don't know, I'm a newbie.
 
It would depend on whether your in DOS or Windoze....<br>Also, let us know what color depth you are using&nbsp;&nbsp;(2, 16 , 256, 65535 colors etc) and what resolution (320x200, 640x480, etc) A routine that that automatically figures this out can be quite complex, but one that deals with one resolution & color depth isn't too hard to implement. <p> <br><a href=mailto:Kim_Christensen@telus.net>Kim_Christensen@telus.net</a><br><a href= Page</a><br>
 
Windows 98 at 1024x768, 65535 colours.
 
GetPixel did work, but I was hoping you guys could come up with something quicker.&nbsp;&nbsp;It will do for now, thanks for you help.<br><br>Gareth
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top