首 页文章中心黑客软件黑客动画绿色软件私服技术私服下载本站论坛
您当前的位置:黑客之 家文章中心黑客编程VB 编程 → 文章内容 退出登录 用户管理
本类热门文章
相关文章
站内广告
VB仿QQ自动隐藏窗体
作者:本站  来源:本站整理  发布时间:2007-12-19 11:18:05

减小字体 增大字体

Option Explicit
Private Type POINTAPI
  X As Long
  Y As Long
End Type
Private 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 Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Dim Showing As Boolean, pp As POINTAPI, nc%

Private Sub Form_Load()
Timer1.Interval =1
    SetWindowPos Me.hwnd, -1, (Screen.Width - Me.Width * 2) / 14, 0, _
        Width / 15, Height / 15, &H10 Or &H40 
    Showing = True
End Sub

Private Sub Timer1_Timer()
    Dim X%, Y%
    GetCursorPos pp
    X = pp.X * 15
    Y = pp.Y * 15
    If X >= Left And X <= Left + Width And _
        Y >= Top And Y <= Top + Height Then
        'move mouse on it, then show it
        nc = 0
        If Not Showing Then
            ShowIt True
        End If
    Else
        If Showing Then
            nc = nc + 1
            '5*200=1 's
            If nc = 5 Then
                ShowIt False
            End If
        End If
    End If
End Sub

Public Sub ShowIt(f As Boolean)
    Dim i%, st%, ed%
    If f Then
        st = Top
        ed = 0
    Else
        st = Top
        ed = 60 - Height
    End If
    For i = st To ed Step IIf(f, 5, -5)
        Top = i
    Next i
    Showing = f
End Sub

[] [返回上一页] [打 印]
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 友情连接 - 网站地图 - 文章投稿 - 软件发布 - 购物资讯网 - _