Gambar bergerak dalam visual basic   Leave a comment

ini hanyalah sebuah ujicoba tapi berhasil.”Bagi-bagi pengetahuan”

Kemudian sempurnakan desain form nya dengan menambahkan gambar kedalam control image nya… terserah ja gambarnya…disini ane memasukkan gambar-gambar emotion,,

4. OK… sampai disini pekerjaan desain form dh selesai.. selanjutnya listing program…

( hal yang paling membosankan…) kalaw g mw bosan, silahkan copy paste ja listing program dibawah ne…

Private Sub Command1_Click()

Timer1.Enabled = True

End Sub

 

Private Sub Command2_Click()

Timer1.Enabled = False

Image1.Visible = True

Image2.Visible = False

Image3.Visible = False

Image4.Visible = False

Image5.Visible = False

End Sub

 

Private Sub Form_Load()

Timer1.Interval = 350

Timer1.Enabled = False

Form1.BackColor = vbWhite

Command1.Caption = “START”

Command2.Caption = “STOP”

Image1.Visible = True

Image2.Visible = False

Image3.Visible = False

Image4.Visible = False

Image5.Visible = False

End Sub

 

Private Sub Timer1_Timer()

If Image1.Visible = True Then

Image1.Visible = False

Image2.Visible = True

Image3.Visible = False

Image3.Visible = False

Image4.Visible = False

Image5.Visible = False

ElseIf Image2.Visible = True Then

Image1.Visible = False

Image2.Visible = False

Image3.Visible = True

Image4.Visible = False

Image5.Visible = False

ElseIf Image3.Visible = True Then

Image1.Visible = False

Image2.Visible = False

Image3.Visible = False

Image4.Visible = True

Image5.Visible = False

ElseIf Image4.Visible = True Then

Image1.Visible = False

Image2.Visible = False

Image3.Visible = False

Image4.Visible = False

Image5.Visible = True

ElseIf Image5.Visible = True Then

Image1.Visible = True

Image2.Visible = False

Image3.Visible = False

Image4.Visible = False

Image5.Visible = False

End If

End Sub

 

Posted Oktober 28, 2010 by abdijeinlaknat brotherbad in Bebas

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s