Hello all...I have a program that analysis pixels by taking a screengrab...
So i use this in a loop but the problem is the first time it runs it works perfectly but then after it loops the r, g, b code stays the same...I'm assuming the problem is that when it loops its using the same screengrab and not taking a new one thus the pixel stays the same even though its changed on the screen...So how do I make it refresh when the loop restarts and take a new screenshot with the code above every time so it properly reports the current pixel color on the current screen? Let me know if this isn't clear...Thanks!Code:Dim region As New Rectangle(0, 0, 1, 1) Dim screenBitmap As New Bitmap(region.Width, region.Height, Imaging.PixelFormat.Format64bppPArgb) Dim bitmapGraphics As Graphics bitmapGraphics = Graphics.FromImage(screenBitmap) Using bitmapGraphics bitmapGraphics.CopyFromScreen(resetx, resety, 0, 0, region.Size) End Using Dim c As Color = screenBitmap.GetPixel(0, 0) Dim mouseloc As Point = Cursor.Position




Reply With Quote
