根目录下建一个
文件夹PIC,在PIC下存放5张
图片,
然后
添加一个timer1控件,一个image1控件,
它的interval设5000(即5秒)
Private Sub Form_Load()
Dim i As Integer
Image1.Picture = LoadPicture(App.Path & "pic\1.bmp")
End Sub
Private Sub Timer1_Timer()
i = Int(Rnd * 5 + 1)
Image1.Picture = LoadPicture(App.Path & "\pic\" & i & ".bmp")
End Sub