Private Sub Command2_Click()
Picture1.AutoSize = True
Do
xx = Rnd * Picture2.Width
yy = Rnd * Picture2.Height
Picture2.PaintPicture Picture1.Picture, xx, yy,Picture1.Width,Picture1.Height
DoEvents
Loop
End Sub
鏡頭推出效果
Private Sub Command3_Click()
Picture2.Cls
Picture1.AutoSize = False
Picture1.Width = 0
Picture1.Height = 0
For i = 0 To 2000 Step 2
roww = (Picture2.Width - Picture1.Width) / 2 - i / 2
coll = (Picture2.Height - Picture1.Height) / 2 - i / 2
Picture2.PaintPicture Picture1.Picture, roww, coll,Picture1.Width + i, Picture1.Height + i
DoEvents
Next i
For i = 2000 To 0 Step -2
roww = (Picture2.Width - Picture1.Width) / 2 - i / 2
coll = (Picture2.Height - Picture1.Height) / 2 - i / 2
Picture2.PaintPicture Picture1.Picture, roww, coll,Picture1.
Width + i, Picture1.Height + i
DoEvents
Next i
Picture1.AutoSize = True
End Sub
拖尾效果
Private Sub Command4_Click()
Picture2.Cls
Picture1.AutoSize = False
Picture1.Width = 0
Picture1.Height = 0
For i = 0 To 2000 Step 2
stepp = i / 2
Picture2.PaintPicture Picture1.Picture, stepp, stepp,Picture1.Width + i, Picture1.Height + i
DoEvents
Next i
Picture1.AutoSize = True
End Sub
結(jié)束按鈕
Private Sub Command5_Click()
End
End Sub
準(zhǔn)備工作
Private Sub Form_Load()
Picture1.Picture = LoadPicture("d:\windows\256color.bmp")
Command1.Caption = "圖像平鋪"
Command2.Caption = "隨機(jī)顯示"
Command3.Caption = "鏡頭伸縮"
Command4.Caption = "拖尾效果"
Command5.Caption = "退出"
End Sub
希望與更多計(jì)算機(jī)等級(jí)考試的網(wǎng)友交流,請進(jìn)入計(jì)算機(jī)等級(jí)考試論壇
更多信息請?jiān)L問:考試吧計(jì)算機(jī)等級(jí)考試欄目
北京 | 天津 | 上海 | 江蘇 | 山東 |
安徽 | 浙江 | 江西 | 福建 | 深圳 |
廣東 | 河北 | 湖南 | 廣西 | 河南 |
海南 | 湖北 | 四川 | 重慶 | 云南 |
貴州 | 西藏 | 新疆 | 陜西 | 山西 |
寧夏 | 甘肅 | 青海 | 遼寧 | 吉林 |
黑龍江 | 內(nèi)蒙古 |