1 / 6

Създаване на анимации чрез обекта Timer

Създаване на анимации чрез обекта Timer. 1. Анимация. Потребителски интерфейс. 2. Кодиране на обекта Timer. Private Sub Timer1_Timer() i = i - 1 If i = -2 Then Play End If Image1.Picture = LoadPicture("C:Documents and SettingsAdminDesktopAnimation" & i & ".jpg") If i = -1 Then

hallieb
Download Presentation

Създаване на анимации чрез обекта Timer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Създаване на анимации чрез обекта Timer

  2. 1. Анимация • Потребителски интерфейс

  3. 2. Кодиране на обекта Timer Private Sub Timer1_Timer() i = i - 1 If i = -2 Then Play End If Image1.Picture = LoadPicture("C:\Documents and Settings\Admin\Desktop\Animation\" & i & ".jpg") If i = -1 Then Timer1.Interval = 5000 End If End Sub

  4. 3. Кодиране на процедурата PlayAnimation() Private Sub PlayAnimation() Timer1.Enabled = True i = 10 Timer1.Interval = CInt(Text1.Text) Timer1_Timer End Sub

  5. 4. Кодиране на бутоните Stop и Play • Бутон Play: Private Sub Command1_Click() PlayAnimation End Sub • Бутон Stop: Private Sub Command2_Click() Timer1.Enabled = False End Sub

  6. 5. Стартиране на програмата • Компилиране на програмата; • Отстраняване на грешки;

More Related