Home > Software engineering >  At the end of a certain time program
At the end of a certain time program

Time:05-13

Have image controls for help and form 2, want to display images in the two controls, alternately in the timer1_timer time control is used to stop, such as the form is loaded after 15 seconds, image1 stop display images, here in time and datediff function to do, want to write programs for help? If without these two functions, there are other ways, thank you
Private Sub Form_Load ()
Timer1. Enabled=False
Timer2. Interval=150
A=Time

End Sub



Private Sub Timer1_Timer ()
Timer2. Enabled=False

Timer1. Interval=150
Image1 (0). The Picture=LoadPicture (" d: \ "& amp; Int * Rnd (11 + 1) & amp; ". JPG ")
Image1 (0). Stretch=True
Image1 (0). Move 10, 10, 4000, 4000
C=DateDiff (" s ", a, Time)
End Sub

Private Sub Timer2_Timer ()
P=p + 1
Image1 (1). The Picture=LoadPicture (" d: \ "& amp; Int * Rnd (11 + 1) & amp; ". JPG ")
Image1 (1). Stretch=True
Image1 (1). Move 4110, 10, 4000, 4000
If p & gt; 10 Then Call Timer1_Timer

Timer1. Enabled=True
End Sub
  • Related