level 1
娃哈哈38
楼主
Option Explicit
Dim i *定义变量i
Const n = 8 *定义照片张数
Private Sub Command1_Click()
Image1.Picture = LoadPicture("p1.jpg") *显示第一张照片
End Sub
Private Sub Command2_Click() *显示上一张照片
If i <= 1 Then
i = n
Else
⑥
End If
Image1.Picture = LoadPicture("p" & i & ".jpg")
End Sub
Private Sub Command3_Click() *显示下一张照片
If i >= n Then
i = 1
Else
i = i + 1
End If
Image1.Picture = LoadPicture("p" & i & ".jpg")
End Sub
Private Sub Command4_Click()
Image1.Picture = LoadPicture("p8.jpg") *显示最后一张照片
End Sub
Private Sub Command5_Click()
If Command5.Caption = " ①" Then
Command5.Caption = "自动浏览停"
Timer1.Enabled = ② *打开Timer1_Timer事件
Else
Command5.Caption = "自动浏览"
Timer1.Enabled = False *关闭Timer1_Timer事件
③
End Sub
Private Sub Form_Load()
Image1.Picture = ④ *载入图像p0
Image1.⑤ = True *图像会自动调整大小以适应图像控件的尺寸
End Sub
Private Sub Timer1_Timer()
Timer1.Interval = ⑦ *设置计时器的事件间隔为1秒
If ⑧ Then
i = 1
End If
Image1.Picture = LoadPicture("p" & ⑨ & ".jpg")
i = i + 1
End Sub
2014年10月11日 12点10分
1
Dim i *定义变量i
Const n = 8 *定义照片张数
Private Sub Command1_Click()
Image1.Picture = LoadPicture("p1.jpg") *显示第一张照片
End Sub
Private Sub Command2_Click() *显示上一张照片
If i <= 1 Then
i = n
Else
⑥
End If
Image1.Picture = LoadPicture("p" & i & ".jpg")
End Sub
Private Sub Command3_Click() *显示下一张照片
If i >= n Then
i = 1
Else
i = i + 1
End If
Image1.Picture = LoadPicture("p" & i & ".jpg")
End Sub
Private Sub Command4_Click()
Image1.Picture = LoadPicture("p8.jpg") *显示最后一张照片
End Sub
Private Sub Command5_Click()
If Command5.Caption = " ①" Then
Command5.Caption = "自动浏览停"
Timer1.Enabled = ② *打开Timer1_Timer事件
Else
Command5.Caption = "自动浏览"
Timer1.Enabled = False *关闭Timer1_Timer事件
③
End Sub
Private Sub Form_Load()
Image1.Picture = ④ *载入图像p0
Image1.⑤ = True *图像会自动调整大小以适应图像控件的尺寸
End Sub
Private Sub Timer1_Timer()
Timer1.Interval = ⑦ *设置计时器的事件间隔为1秒
If ⑧ Then
i = 1
End If
Image1.Picture = LoadPicture("p" & ⑨ & ".jpg")
i = i + 1
End Sub