Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / color question

Author
Message
Mike B
20
Years of Service
User Offline
Joined: 23rd Jun 2004
Location: kent,wa
Posted: 1st Jul 2004 14:39 Edited at: 1st Jul 2004 14:40
how would i check what color my mouse in on?
by the way im useing Dark Basic Classic Enhanced version
thx mike
Ocean Runner
21
Years of Service
User Offline
Joined: 18th May 2003
Location: United States
Posted: 1st Jul 2004 14:45
Use the point() command. It will give you the color value of the mouse cursor.

"Computers in the future may weigh no more then
1.5 tons. - Popular Mechanics, 1949
Mike B
20
Years of Service
User Offline
Joined: 23rd Jun 2004
Location: kent,wa
Posted: 1st Jul 2004 14:51 Edited at: 1st Jul 2004 15:00
thx for the quick reply
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 2nd Jul 2004 02:59
heh-heh-heh-heh...

I'd like to add my two cents in here concerning the point() command. In DBC (pro too?) it returns the ACTUAL COLOR VALUE placed into video memory, which is not necessarily the color you painted there. Especially when running in video 16-bit video mode, this can mess you up.

For example, if you paint using RBG(85, 45, 0) and read it with point(), you'll get back the color of RGB(82, 44, 0) because the video mode doesn't have the resolution for the first.

So you have to be careful here; knowing which mode you're in and what color you've painted and how the screen will react to it.

S.

Any truly great code should be indisguishable from magic.

Login to post a reply

Server time is: 2024-09-22 15:39:08
Your offset time is: 2024-09-22 15:39:08