怎么用vb打开屏幕保护程序,不是定时运行,是让它立刻运行

来源:百度知道 编辑:UC知道 时间:2024/05/31 02:28:08
怎么运行屏保的原码?

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub Command1_Click()
Call ShellExecute(vbNull, "open", 屏保文件路径, vbNull, vbNull, SW_SHOWNORMAL)
End Sub

直接Shell(屏保文件路径)行了