'加入一个Timer1
'把FORM1的BorderStyle 属性设置为0
'按F11程序出现 按其他键程序隐藏
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
Private Const WS_EX_LAYERED = &H80000
Private Const GWL_EXSTYLE = (-20)
Private Const LWA_ALPHA = &H2
Private Const LWA_COLORKEY = &H1
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 122 Then
Dim rtn As Long
rtn = GetWindowLong(hwnd, GWL_EXSTYLE)
rtn = rtn Or WS_EX_LAYERED
SetWindowLong hwnd, GWL_EXSTYLE, rtn
SetLayeredWindowAttributes hwnd, 0, 255, LWA_ALPHA
Else
rtn = GetWindowLong(hwnd, GWL_EXSTYLE)
rtn = rtn Or WS_EX_LAYERED
SetWindowLong hwnd, GWL_EXSTYLE, rtn
SetLayeredWindowAttributes hwnd, 0, 0, LWA_ALPHA
End If
End Sub
Private Sub Form_Load()
Me.Timer1.Interval = 2000
Dim rtn As Long
rtn = GetWindowLong(hwnd, GWL_EXSTYLE)
rtn = rtn Or WS_EX_LAYERED
SetWindowLong hwnd, GWL_EXSTYLE, rtn
SetLayeredWindowAttributes hwnd, 0, 0, LWA_ALPHA
End Sub
Private Sub Timer1_Timer()
Me.SetFocus
End Sub
左击屏幕下边任务栏显示行点属性,打开后在任务栏,在自动隐藏任务栏前打勾就OK,要想显示就去掉勾就可以了
在VB编程里:
只要把窗体的ShowInTaskbar和Visible的属性设置为false就可以了,不过在进程里还是找得到的.
大哥 人家是要做病毒
你说那种不行的