This web site uses cookies. By using the site you accept the cookie policy.This message is for compliance with the UK ICO law.

<< Previous | 1 | 2 | 3 | 4 | Next >> |
Setting the System TimeSetting the System Time
Some software applications include the requirement to change the system clock time. This can be achieved using C# by calling a Windows API function. This article describes how to declare and use the SetSystemTime function and related SYSTEMTIME structure.
Setting Performance CountersSetting Performance Counters
Microsoft Windows provides a large number of performance counters that can be monitored with tools such as Performance Monitor. It is possible to add new counters and set their values to allow such tools to monitor custom .NET applications and services.
Detecting Processes that are not RespondingDetecting Processes that are not Responding
If you are developing software that monitors other programs or services, it can be useful to detect when a process has stopped responding to the user. This can easily be achieved using members of the .NET framework's Process class.
Detecting User InactivityDetecting User Inactivity
Some software, such as backup utilities, can use a large proportion of processor time and other resources. Often the user is given the option to only run such processes when the computer is not in use. This requires the detection of user inactivity.
Getting the System Up TimeGetting the System Up Time
Sometimes it is necessary to know how much time has passed since Windows was started. This article demonstrates two ways to obtain this information using the .NET framework and describes the limitations of one of the commonly used methods.
Reading Performance CountersReading Performance Counters
Microsoft Windows provides a large number of categorised performance counters that can be used to monitor the utilisation of hardware, services, software applications and drivers. Usually viewed with Performance Monitor, they can also be read using C#.
Getting the Current Application&#39;s Memory UsageGetting the Current Application's Memory Usage
When you are creating an application that can be memory-intensive, it may be useful to monitor the current memory usage. This allows you to modify the behaviour of the program as its RAM requirements increase and to predict out-of-memory exceptions.
Get the Registered User and OrganisationGet the Registered User and Organisation
When Windows is installed, the user must register a name and, optionally, the name of an organisation. This information is retained by the operating system. When asking for similar details, it is useful to present this information as default values.
Getting the Current Machine NameGetting the Current Machine Name
When an application's user performs certain actions you may want to log details for auditing purposes. For networked software it can be useful to retain the name of the user's local computer. This name can be obtained using the .NET framework.
Getting the Processor Speed and Number of CoresGetting the Processor Speed and Number of Cores
Some types of software need to determine the number of processors or cores present and to know the clock speed. This information could be displayed to the user or can be used to adjust the user experience according to the performance of the machine.
<< Previous | 1 | 2 | 3 | 4 | Next >> |