Click here to Skip to main content
16,019,018 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to make a macro and want c# code to check if an area of a screen has a specific color. can this be done?
Posted
Comments
Mitchell J. 25-Jan-14 23:38pm    
I'm assuming that you are using WinForms? What do you mean by "make a macro"?
BillWoodruff 26-Jan-14 1:06am    
You really need to give details about exactly what you want to test: a fixed area of the screen ?; a user selected area of the screen ?; a certain Control on a Form ? ... and so forth ...

Does your code trigger the test, or does some user-action trigger the test ?

1 solution

Yes, of course. One of the ways to do it is using System.Drawing.Graphics.Graphics.CopyFromScreen:
http://msdn.microsoft.com/en-us/library/system.drawing.graphics.copyfromscreen%28v=vs.110%29.aspx[^].

—SA
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900