|
-
Aug 19th, 2005, 01:29 AM
#1
Thread Starter
Junior Member
detecting pixel colors
I haven't learned vb yet, because I don't want to spend the $100+ on the software if I won't end up being able to make a program that does what I want it to do. I posted a couple months ago with a similar question, and the response was basically that it would be rather complicated to do what I want to do. But I have thought of a way to make things much more simple for me, if I make a program.
My question is, if I learned vb, would it be a complicated or somewhat basic task to make a program that could detect the color of a specific pixel on my monitor, and react to it if it's the right color? The pixel wouldn't be showing up on the program I make, but on a webpage.
-
Aug 19th, 2005, 01:34 AM
#2
Re: detecting a pixels color
Fairly simple:
- Use FindWindow() to get the handle of the web browser;
- Use FindWindowEx() to get the handle of the webpage rendering control (depends on the browser);
- GetDC() to get a handle to the DC of the control;
- GetPixel() to get the pixel colour;
- ReleaseDC to release the DC handle.
I don't know where you're gonna find VB6 these days though, good luck.
-
Aug 19th, 2005, 01:47 AM
#3
Frenzied Member
Re: detecting a pixels color
You can find VB6 almost everywhere, Ebay even and it might be cheaper at auctions then in the store. (Though I'm not sure MS EULA actually allows selling of owned products due to sharing of keys)
Anyway; What penagate says is the fastest way, the findwindow functions might not be necessary if it's a foregroundwindow (you can get the handle for that).
-
Aug 19th, 2005, 06:42 AM
#4
Thread Starter
Junior Member
thanks
Thank you. That sounds very simple. I will try to get vb6 on ebay. I looked at a few auctions and they were $100-$175. Would it be worth saving some money to get vb5? (assuming I could find it). Or should spend a bit more for 6?
-
Aug 19th, 2005, 06:57 AM
#5
Re: thanks
 Originally Posted by ship
Thank you. That sounds very simple. I will try to get vb6 on ebay. I looked at a few auctions and they were $100-$175. Would it be worth saving some money to get vb5? (assuming I could find it). Or should spend a bit more for 6?
Dont go back to 5 it would make no sence IMO, if anythign you should be looking at moving to the dark side (Vb .Net)
Pino
-
Aug 19th, 2005, 07:35 AM
#6
Frenzied Member
Re: thanks
As if a thousand VB VM's cried out loud and got suddenly silenced.
-
Aug 19th, 2005, 07:35 AM
#7
Re: thanks
ship: I moved your post, and Pino's over here as they are relevant to the topic (although I'm not sure what this has to do with Pixel colors).
I'm going to delete the other thread you started.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|