Home » Windows API

SetCaretBlinkTime

說明:
SetCaretBlinkTime 函式可指定滑鼠游標閃爍的間隔,單位為毫秒


引用函式庫:
User32


適用系統:
Windows NT 3.1 或 Windows 95以上


函式原型:

Declare Function SetCaretBlinkTime Lib "user32" Alias "SetCaretBlinkTime" ( _
	ByVal wMSeconds As Long _
	) As Long



參數型態及說明:
wMSecondsLong 要指定的時間間隔,單位毫秒

回傳值:
Long 呼叫成功的話,將會回傳非零的數值;若呼叫失敗的話,則回傳 0

.NET Framework API:


VB範例:

檢視原始碼 Visual Basic
1
2
3
4
5
6
7
8
9
'VB的宣告
Private Declare Function SetCaretBlinkTime Lib "user32" ( _
	ByVal wMSeconds As Long _
	) As Long
 
Dim rtvl As Long
 
'指定滑鼠游標閃爍的間隔
rtvl = SetCaretBlinkTime(530)

RB範例:

檢視原始碼 REALBasic
1
2
3
4
5
6
7
8
9
'RB的宣告
Declare Function SetCaretBlinkTime Lib "user32" ( _
	wMSeconds As Integer _
	) As Boolean
 
Dim rtvl As Boolean
 
'指定滑鼠游標閃爍的間隔
rtvl = SetCaretBlinkTime(530)

VB.NET範例:

1
2
3
4
5
6
7
8
9
10
11
'VB.NET的宣告
<DllImport("user32.dll")> _
Shared Function SetCaretBlinkTime( _
	ByVal wMSeconds As UInteger _
	) As Boolean
End Function
 
Dim rtvl As Boolean
 
'指定滑鼠游標閃爍的間隔
rtvl = SetCaretBlinkTime(530)

C#範例:

1
2
3
4
5
6
7
8
9
10
//C#的宣告
[DllImport("user32")]
public static extern bool SetCaretBlinkTime(
	uint wMSeconds
	);
 
bool rtvl;
 
//指定滑鼠游標閃爍的間隔
rtvl = SetCaretBlinkTime(530);

發表迴響