Ketikkan Listing Berikut ini :
Private Declare Function VkKeyScan Lib "user32" Alias "VkKeyScanA" (ByVal cChar As Byte) As Integer
Private Declare Sub Keybd_event Lib "user32" (ByVal bVk As Integer, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Function RandomNumber(ByVal LowerBound As Single, ByVal UpperBound As Single) As Single
Randomize Timer
RandomNumber = (UpperBound - LowerBound) * Rnd + LowerBound
End Function
Private Sub txtPassword_Change()
txtPassword.Locked = True '<= =Sengaja Biar Nggak banyak Makan Resource
Dim LoopC As Byte, i As Byte
LoopC = RandomNumber(3, 254) 'Ciptakan Nilai Random mulai 3-254
i = 0
Do While LoopC > i
Call Keybd_event(VkKeyScan(RandomNumber(32, 126)), 0, 0, 0)
i = i + 1
Loop
DoEvents
txtPassword.Locked = False
End Sub
Outputnya Seperti Berikut:
0 komentar:
Posting Komentar