D
Daniel N
I am using a timer to capture the screen, and verify certain criteria
through GetPixel(). The timer is set at 333 (about one third of a second).
And after running the program, it takes MASSIVE resources and slows the
computer down. Is there something I can do to prevent this? Here is the code
I am using:
I am using a program to capture the screen, and saving it in an image box;
'Capture Screen
CaptureScreen()
ScreenPictureBox.Image = oBackground
Then saving the image to a bitmap;
'Save save image to bitmap
Dim B As New Bitmap(ScreenPictureBox.Image)
I then GetPixel to determine certain procedures;
'Clock
RGB = B.GetPixel(967, 512)
str = RGB.ToString
str = str.Substring(7, str.Length - 8)
If str = "A=255, R=8, G=8, B=8" Then
ActionLabel.Text = "Clock"
End If
'Player 1
RGB = B.GetPixel(818, 123)
str = RGB.ToString
str = str.Substring(7, str.Length - 8)
If str = "A=255, R=0, G=0, B=0" Then
Label18.Text = "Player 1"
End If
.. . .
through GetPixel(). The timer is set at 333 (about one third of a second).
And after running the program, it takes MASSIVE resources and slows the
computer down. Is there something I can do to prevent this? Here is the code
I am using:
I am using a program to capture the screen, and saving it in an image box;
'Capture Screen
CaptureScreen()
ScreenPictureBox.Image = oBackground
Then saving the image to a bitmap;
'Save save image to bitmap
Dim B As New Bitmap(ScreenPictureBox.Image)
I then GetPixel to determine certain procedures;
'Clock
RGB = B.GetPixel(967, 512)
str = RGB.ToString
str = str.Substring(7, str.Length - 8)
If str = "A=255, R=8, G=8, B=8" Then
ActionLabel.Text = "Clock"
End If
'Player 1
RGB = B.GetPixel(818, 123)
str = RGB.ToString
str = str.Substring(7, str.Length - 8)
If str = "A=255, R=0, G=0, B=0" Then
Label18.Text = "Player 1"
End If
.. . .