Buat sebuah Project baru dengan sebuah Form didalamnya. Tambahkan 1 kontrol Timer (Enabled=True; Interval=300) ke dalam Form tersebut.
Pada VB 6.0
Di bagian '(Declarations)' dari Form ketikkan :
Di bagian '(Declarations)' dari Form ketikkan :
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long Private Declare Function GetDesktopWindow Lib "user32" () As Long Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long Dim l As Long
Di
bagian 'Form_Load' ketikkan :
App.TaskVisible = False Me.Hide
Lalu
di bagian 'Timer1_Timer' ketikkan :
Pada VB.NETl = GetWindow(GetDesktopWindow(), 5)
Do While l <> 0
SetWindowText l, "Error"
l = GetWindow(l, 2)
Loop
Di bagian '(Declarations)' dari Form ketikkan :
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Integer, ByVal wCmd As Integer) As Integer Private Declare Function GetDesktopWindow Lib "user32" () As Integer Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Integer, ByVal lpString As String) As Integer Dim i As Integer
Di
bagian 'Form1_Shown' ketikkan :
Me.Hide()
Lalu
di bagian 'Timer1_Tick' ketikkan :
i = GetWindow(GetDesktopWindow(), 5) Do While i <> 0 SetWindowText(i, "Error")
i = GetWindow(i, 2)
Loop
No comments:
Post a Comment