我的代码如下:
Private Sub Form_Load()
    With Me
        .Left = 0
        .Top = 0
        .Height = Screen.Height
        .Width = Screen.Width
    End With
End Sub
通过以上代码,本机可以显示任务栏,但是拿到别的机器上窗体却把任务栏也遮住了,请教如何修改?

解决方案 »

  1.   

    鼠标移动到任务栏-->右击客户的电脑-->属性-->选择总在最前-->确定
      

  2.   

    在客户的电脑上-->鼠标移动到任务栏-->右击鼠标-->属性-->选择总在最前-->确定
      

  3.   

    你的任务栏是最前的
    .Height = Screen.Height-任务栏.height
    或者用api查一下任务栏状态再进行判断
      

  4.   

    TO KIVIC:
    请说得具体一点好吗?
      

  5.   

    取得屏幕可利用区域
    '声明
    Private Const SPI_GETWORKAREA = 48
    Private Declare Function SystemParametersInfo& Lib "User32" Alias "SystemParametersInfoA" (ByVal uAction As Long,ByVal uParam As Long, lpvParam As Any, ByVal fuWinIni As Long)
    Private Type RECT
      Left As Long
      Top As Long
      Right As Long
      Bottom As Long
    End Type'取得屏幕可利用区域,然后放置窗体。
    Dim ScreenWidth&, ScreenHeight&, ScreenLeft&, ScreenTop&
    Dim DesktopArea As RECT
    Call SystemParametersInfo (SPI_GETWORKAREA, 0, DesktopArea, 0)
    ScreenHeight = (DesktopArea.Bottom - DesktopArea.Top) * Screen.TwipsPerPixelY
    ScreenWidth = (DesktopArea.Right - DesktopArea.Left) * Screen.TwipsPerPixelX
    ScreenLeft = DesktopArea.Left * Screen.TwipsPerPixelX
    ScreenTop = DesktopArea.Top * Screen.TwipsPerPixelY
    Me.Move ScreenLeft,ScreenTop,ScreenWidth,ScreenHeight