各位大师,帮忙解答一下,在VB中怎么实现类似Windows自动隐藏任务栏的功能如状态栏或控件等!!!!20分请您写一下注释!!!急急急!!!在线等 !!!!!!!!!

解决方案 »

  1.   

    Private Sub Cancel_Click()Unload Me 'exit the programEnd Sub
    Private Sub Hide_Click()rtn = FindWindow("Shell_traywnd", "") 'get the Window
    Call SetWindowPos(rtn, 0, 0, 0, 0, 0, SWP_HIDEWINDOW) 'hide the Tasbar
        
    End Sub
    Private Sub Show_Click()rtn = FindWindow("Shell_traywnd", "") 'get the Window
    Call SetWindowPos(rtn, 0, 0, 0, 0, 0, SWP_SHOWWINDOW) 'show the TaskbarEnd Sub'模块Option ExplicitDim rtn As LongDeclare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As LongPublic Const SWP_HIDEWINDOW = &H80
    Public Const SWP_SHOWWINDOW = &H40
      

  2.   

    不好意思,我要求的是鼠标移动实现类似Windows自动隐藏任务栏的功能,如状态栏或控件的实现自动隐藏等!!!!20分请您写一下注释!!!急急急!!!在线等
      

  3.   

    不好意思,我要求的是鼠标移动实现类似Windows自动隐藏任务栏的功能,如状态栏或控件的实现自动隐藏等!!!!20分请您写一下注释!!!急急急!!!在线等
      

  4.   

    ^_^
    这样吧;
    '在Module1模块中
    Option Explicit
    Public Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
     Type POINTAPI
       x As Long
       y As Long
    End Type'在Form1中代码如下,需要一个timer1.
    Option Explicit
    Dim mouse As POINTAPI
    Private Sub Form_Load()
      AutoHide.Height = Screen.Height
      AutoHide.Top = 0
       AutoHide.Left = (0 - AutoHide.Width) + 50
    End Sub
    Private Sub Timer1_Timer()
    Dim a
          a = GetCursorPos(mouse)
    If mouse.x = 0 Then
       AutoHide.Left = 0
    End If
    If mouse.x > AutoHide.ScaleWidth Then
         AutoHide.Left = (0 - AutoHide.Width) + 50
     End If
    End Sub
      

  5.   

    忘了说明一点Timer1.Interval = 10,这个10值大小要看你的需要了.