请给出源代码!
我已经试过 UpdateWindow 与 RedrawWindow 方法,都无效

解决方案 »

  1.   

    用ShowWindows,,,ApIshowwindows hwnd,0
      

  2.   

    Option Explicit
    Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
    Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
    Dim task As Long
    Dim win As Long
    Dim bswap As BooleanPrivate Sub Command1_Click()
        If Not bswap Then
            ShowWindow win, 0
        Else
            ShowWindow win, 1
        End If
        bswap = Not bswap
    End SubPrivate Sub Form_Load()
        task = FindWindow("Shell_TrayWnd", vbNullString)
        If task Then
            win = FindWindowEx(task, 0, "Button", vbNullString)
            If win Then
            Else
                MsgBox "没有找到开始按钮"
                Unload Me
            End If
        Else
            MsgBox "没有找到任务栏"
            Unload Me
        End If
    End SubPrivate Sub Form_Unload(Cancel As Integer)
        If bswap Then
            ShowWindow win, 1
        End If
    End Sub
      

  3.   

    直接使用 ShowWindow 它有个隐藏的参数的