随机数生成器付费版(求个随机数生成器)

本文目录
求个随机数生成器
VB中有专门生成随机数的函数 .
给你的代码,你加进去,并添上相应控件就行了.然后看下代码就很容易明白了.谢谢.
Private Sub Form_Load()
Command1.Caption = "随机画圆"
Command2.Caption = "随机文字"
Command3.Caption = "立体图形"
Command4.Caption = "随机图像"
Command5.Caption = "退出"
Form1.ScaleMode = 1
Picture1.ScaleMode = 1
Picture2.Picture = LoadPicture("D:\My Documents\My Pictures\hah.jpg")
End Sub
’注释: 随机画圆动画
Private Sub Command1_Click()
Dim XPos, YPos
Picture1.Cls
Do
nn = Int(100 * Rnd)
If nn 》 0 Then
Picture1.DrawWidth = nn
End If
XPos = Rnd * Picture1.ScaleWidth
YPos = Rnd * Picture1.ScaleHeight
Picture1.PSet (XPos, YPos), RGB(Rnd * 256, Rnd * 256, Rnd * 256)
DoEvents
Loop
End Sub
’注释: 随机文字动画
Private Sub Command2_Click()
Picture1.Cls
Do
nn = Int(45 * Rnd)
If nn 》 0 Then
Picture1.FontSize = nn
End If
Picture1.CurrentX = Rnd * Picture1.ScaleWidth - 1000
Picture1.CurrentY = Rnd * Picture1.ScaleHeight
Picture1.ForeColor = RGB(Rnd * 256, Rnd * 256, Rnd * 256)
Picture1.Print "enjin 你个猪!"
n = n + 1
If n 》 50 Then
n = 0
Picture1.BackColor = QBColor(Rnd * 15)
End If
DoEvents
Loop
End Sub
’注释: 立体随机动画
Private Sub Command3_Click()
Dim m, n
Picture1.DrawWidth = 1
Picture1.BackColor = RGB(210, 150, 0)
Picture1.Cls
Do
m = Rnd * Picture1.ScaleWidth
n = Rnd * Picture1.ScaleHeight - 500
For i = 0 To Rnd * 800
Picture1.Line (m, n + 2.5 * i)-(m + i / 2, n + 2 * i), RGB(180, 180, 180)
Picture1.Line (m, n + 2.5 * i)-(m - i / 2, n + 2 * i), RGB(80, 80, 80)
Next i
DoEvents
Loop
End Sub
’注释: 随机图像显示
Private Sub Command4_Click()
Do
xx = Rnd * Picture1.Width
yy = Rnd * Picture1.Height
Picture1.PaintPicture Picture2.Picture, xx, yy, Picture2.Width, Picture2.Height
DoEvents
Loop
End Sub
’注释: 退出按钮
Private Sub Command5_Click()
End
End Sub
随机数生成器 谁能给我随机1000个11位的数 这20分就是他的了
《html》
《body》
《script type="text/javascript"》
var number = Math.random();
document.write(right(number.toString(),11));
《/script》
《/body》
《/html》

更多文章:
在from子句中可以出现(如何在from 子句中嵌套查询下面的语句在access中出错!)
2026年10月11日 05:20
countif函数统计个数怎么用(countif函数怎么用 详解Excel中countif函数的使用方法)
2026年10月11日 03:30
正则匹配数字之前的字符(正则表达式如何匹配前面是数字、中间是“/”、后面也是数字,就像2/3专业的模式)
2026年10月11日 03:00
orlnsertbootmediinselected(我电脑开机显示这个是什么意思or insert boot media in select)
2026年10月10日 23:00
display的用法(display是什么意思 详解display的含义和用法)
2026年10月10日 22:00
html全部居中代码(怎么让网页居中显示,html如何让网页居中)
2026年10月10日 21:10




