Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const SWP_NOACTIVATE = &H10
Const SWP_SHOWWINDOW = &H40
Private Declare Sub 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)
Private Declare Function Putfocus Lib "user32" Alias _
"SetFocus" (ByVal hwnd As Long) As Long
Private Declare Function ShowCursor Lib "user32" (ByVal _
bShow As Long) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal _
hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName As String, ByVal _
lpWindowName As String) As Long
Private Declare Function BringWindowToTop Lib "user32" (ByVal _
hwnd As Long) As Long
Private Sub Form_Load()
Timer1.Interval = 1
Me.BackColor = vbBlack
Text1.BackColor = vbBlack
Text1.ForeColor = vbGreen
Text1.Left = Screen.Width - Text1.Width
Text1.Top = Screen.Height - Text1.Height
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Dim H As Long
Timer1.Enabled = False
H = FindWindow("BaseBar", vbNullString)
If H Then ShowWindow H, 1
H = FindWindow("Shell_TrayWnd", vbNullString)
If H Then ShowWindow H, 1
' ShowCursor True
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If UCase(Text1.Text) = "BEGO" Then
Unload Me
Else
Text1 = ""
End If
KeyAscii = 0
End If
End Sub
Private Sub Timer1_Timer()
BringWindowToTop Me.hwnd
SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, _
SWP_NOACTIVATE Or _
SWP_SHOWWINDOW Or _
SWP_NOMOVE Or _
SWP_NOSIZE
Dim H As Long
H = FindWindow("#32770", "Windows Task Manager")
If H Then ShowWindow H, 0
H = FindWindow("#32771", vbNullString)
If H Then ShowWindow H, 0
H = FindWindow("BaseBar", vbNullString)
If H Then ShowWindow H, 0
H = FindWindow("Shell_TrayWnd", vbNullString)
If H Then ShowWindow H, 0
Rem ShowCursor False
Putfocus Text1.hwnd
End Sub
nah klo pengen ngilangin kursor tuh rem di apus aje....
[---------#no #problem ,#if #u #want #me #to #delete #this #post --------]
{ 0 komentar... Views All / Send Comment! }
Posting Komentar