SystemEvents.CreateTimer Method (Int32)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Creates a new window timer associated with the system events window.

Namespace:   Microsoft.Win32
Assembly:  System (in System.dll)

Public Shared Function CreateTimer (
	interval As Integer
) As IntPtr

Parameters

interval
Type: System.Int32

Specifies the interval between timer notifications, in milliseconds.

Return Value

Type: System.IntPtr

The ID of the new timer.

Exception Condition
ArgumentException

The interval is less than or equal to zero.

InvalidOperationException

System event notifications are not supported under the current context. Server processes, for example, might not support global system event notifications.

ExternalException

The attempt to create a system events window thread did not succeed, or the attempt to create the timer did not succeed.

.NET Framework
Available since 1.1
Return to top
Show: