Logo
English Russian German French Spanish Italian
contact usprivacy
   Support Forums
chart
• Adjust flexgrid cell
• Animation
• Centering form text
• Coffee machine
• Creating fileshares
• Creating shortcuts
• Custom buttons
• Directory browser
• Disable mouse events
• File search by ext
• File transfer
• File watcher
• Formatting flexgrid
• Get Content Type
• Get HTML source
• Get modem port
• HTTP proxy
• ipconfig
• Large file split/merge
• MAPI
• MCI Sound Player
• Menu with images
• MP3 normalizer
• Net Send
• Netstat 2000
• No duplicate entries
• Outlook Address Book
• Set font color
• Shapes
• SOAP test
• Text-to-image
• Text file viewer
• Text find/replace
• UPS component
• View NT groups
• Word template
• Writing DNS control
    • Using DNS control
• Writing SMTP control
    • Sending email
    • Mailing list
• Writing WhoIs control
    • Using WhoIs control
• View HTML source
VB projects - Animation, using picture control

Description: build simple animation with picure control only (and bunch of image files too)
Minimum requirements: VB6
Download: source code
Screenshot:
VB projects - Animation, using picture control
Project: EXE
Controls: cmdDirection (Command Button, Caption = "go back"), tmr (Timer, Interval = 20), pic (PictureBox, AutoSize = -1 'True, BorderStyle = 0 'None)
Additional references: none
Code:
Option Explicit

Dim i As Integer
Dim j As Integer

Private Sub cmdDirection_Click() If cmdDirection.Caption = "go back" Then cmdDirection.Caption = "go" j = -60 Else cmdDirection.Caption = "go back" j = 60 End If End Sub
Private Sub Form_Load() Set pic.Picture = LoadPicture("untitled1.bmp") i = 1 j = 60 End Sub
Private Sub tmr_Timer() If i < 8 Then i = i + 1 Else i = 1 If (pic.Left < Me.Width And j > 0) Or (pic.Left > 0 And j < 0) Then pic.Left = pic.Left + j Set pic.Picture = LoadPicture("untitled" & i & ".bmp") End If End Sub

Copyright © 1996-2008 OstroSoft. All rights reserved. info@ostrosoft.com