473,395 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

System resource Hog

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

.. . .
Jul 4 '06 #1
0 772

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: avishosh | last post by:
Hi, I'm getting the folowing error when tring to open xml file: -------------------------------------------------------------------------------- The system cannot locate the resource specified....
0
by: Roz Lee | last post by:
I am trying to access a satellite assembly for a custom culture using Resource Manager. When I use the .getstring method I get the following error message: System.ArgumentException: I can't...
7
by: WALDO | last post by:
I have an interesting quandary. I have developed a program in VB.Net to extract an icon resource from an exe/dll or from an ico file and enumerate its formats (16x16,256 color;32x32,true...
2
by: mark | r | last post by:
Microsoft JET Database Engine error '80004005' System resource exceeded. /webutils/include_webstats_weeklycount.asp, line 23 Anyone know what this means and how to fix it. Mark
3
by: Jesse | last post by:
Hi together, I've a problem with compiling an application with a build-Script and run it after. Several resource-files I compile with resgen.exe and put the files into a folders of the...
2
by: dpomt | last post by:
I am using the ContentTemplate to extend the CreateUserWizard's CreateUserWizardStep with additional controls. For the CreateUserWizardStep labels, I would like to keep the automatic localization....
1
by: Om | last post by:
Hi All, Can anyone explain me, why we have Resource and Distribution System Database in SQL Server 2005. Whether they were also available in previous versions also. Thanks in Advance. ...
2
by: Nathan Sokalski | last post by:
I am attempting to create icons for controls I have created using VB.NET by using the System.Drawing.ToolboxBitmap attribute. I have managed to do this in C# by specifying the path to the *.ico...
4
by: JamTech | last post by:
The Script Resource and the Web Resource files are generating intermittent errors in my application. I have been trying to chase the cause of the problem but to no avail. I notice that the “d”...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.