• 如何顯示'關機'對話方塊

 方法一

Private Declare Function ShowShutDownDialog Lib "shell32" Alias "#60" _
(ByVal dwReserved As Long) As Long

Private Sub Command1_Click()
ShowShutDownDialog 0
End Sub

 方法二

    '先在 專案->設定引用項目 選擇Microsoft Shell Control And Automation
    Option Explicit

    Private Sub Command1_Click()
    Dim oShell As Shell
    oShell.ShutdownWindows
    End Sub

文件出處

      不明

      Honey

VB心得筆記歡迎各位的指教,如果您有任何文章或資料願意提供給我們的,請來信到VBNote

如果對本站有任何建議,歡迎來信給Honey,我們會盡快給您答覆