SystemEvents.CreateTimer(Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立一個與系統事件視窗相關的新視窗計時器。
public:
static IntPtr CreateTimer(int interval);
public static IntPtr CreateTimer(int interval);
static member CreateTimer : int -> nativeint
Public Shared Function CreateTimer (interval As Integer) As IntPtr
參數
- interval
- Int32
指定計時器通知間隔,以毫秒為單位。
傳回
IntPtr
nativeint
新計時器的ID。
例外狀況
該區間小於或等於零。
目前情境下不支援系統事件通知。 例如,伺服器程序可能不支援全域系統事件通知。
嘗試建立系統事件視窗執行緒未成功,或建立計時器嘗試失敗。