VB 如何把PictureBox 的图片随机显示在窗体上,要求随机同时显示多个
2个回答
2013-12-06
展开全部
添加一个picturebox ,添加一个command
Private Sub Command1_Click()
Me.AutoRedraw = True
Randomize
Me.PaintPicture Me.Picture1.Picture, Rnd * Me.Width, Rnd * Me.Height
End Sub
Private Sub Command1_Click()
Me.AutoRedraw = True
Randomize
Me.PaintPicture Me.Picture1.Picture, Rnd * Me.Width, Rnd * Me.Height
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-12-06
展开全部
Private Sub Form_click()
Form1.Show
For i = 1 To 10
Form1.PaintPicture Picture1.Picture, Rnd * Form1.Width, Rnd * Form1.Height
Next
End Sub
Form1.Show
For i = 1 To 10
Form1.PaintPicture Picture1.Picture, Rnd * Form1.Width, Rnd * Form1.Height
Next
End Sub
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询