我在調用api時,發現了下面了幾個問題:
1.SystemParameterInfo
vb的api聲明工具中第三個參數為 ByRef lpvParam as any.
但若想用來更改桌面壁紙時必須聲明為ByVal lpvParam as any.
2.SendMessage
當聲明為Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
發送SendMessage(me.hwnd,&h112,&hF140,0)為開始屏幕保護,而當第四個參數聲明為ByVal lParam as any則為待機對話框。上述在Win98可以,而在Win2000中已避免了。