untuk membuat aplikasi winamp atau pemutar suara di vb
buatlah seperti contoh yang saya buat
buka project baru dan atur seperti gambar berikut\
lalu masukan kode berikut
Option Explicit
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim cEvent As Single
cEvent = X / Screen.TwipsPerPixelX
Select Case cEvent
Case MouseMove
Debug.Print "MouseMove"
Case LeftUp
Debug.Print "Left Up"
Case LeftDown
Debug.Print "LeftDown"
Case LeftDbClick
Debug.Print "LeftDbClick"
Case MiddleUp
Debug.Print "MiddleUp"
Case MiddleDown
Debug.Print "MiddleDown"
Case MiddleDbClick
Debug.Print "MiddleDbClick"
Case RightUp
Debug.Print "RightUp": PopupMenu mnuform
Case RightDown
Debug.Print "RightDown"
Case RightDbClick
Debug.Print "RightDbClick"
End Select
End Sub
Private Sub mnuHide_Click()
If Not Me.WindowState = 1 Then WindowState = 1: Me.Hide
End Sub
Private Sub mnuShow_Click()
If Me.WindowState = 1 Then WindowState = 0: Me.Show
TrayDelete '[Deleting Tray]
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim X As Integer
If MsgBox("Is it Satisfactory?", vbQuestion + vbYesNo, "Please tell Me") = vbYes Then
X = MsgBox("( Please 'RATE' this code ).Click 'Ok' to copy the site address to your clipboard", vbInformation + vbOKCancel, "ThankYou")
Else
X = MsgBox("( Please give feedback ) to improve this code.Click 'Ok' to copy the site address to your clipboard", vbInformation + vbOKCancel, "Please Give FeedBack")
End If
If X = vbOK Then Clipboard.SetText ("Not set")
End Sub
Private Sub Command4_Click()
MMControl1.Command = "pause"
End Sub
Private Sub Image1_DragDrop(Source As Control, X As Single, Y As Single)
CommonDialog1.Filter = "file mp3 (*.mp3)|*.mp3"
CommonDialog1.ShowOpen
MMControl1.FileName = CommonDialog1.FileName
End Sub
Private Sub Image2_DragDrop(Source As Control, X As Single, Y As Single)
'animation
End
End Sub
Private Sub Image3_DragDrop(Source As Control, X As Single, Y As Single)
TrayAdd hwnd, Me.Icon, "System Tray", MouseMove
mnuHide_Click
End Sub
Private Sub Image4_DragDrop(Source As Control, X As Single, Y As Single)
CommonDialog1.FileName = File1.FileName
File1.FileName = MMControl1.FileName
MMControl1.Command = "open"
MMControl1.Command = "play"
File1.Refresh
End Sub
Private Sub Image5_DragDrop(Source As Control, X As Single, Y As Single)
MMControl1.FileName = File1.FileName
MMControl1.Command = "previous"
End Sub
Private Sub Image6_DragDrop(Source As Control, X As Single, Y As Single)
MMControl1.FileName = File1.FileName
MMControl1.Command = "next"
End Sub
atau mau lebih cepatnya download aja di link ini
1 komentar:
pas banget nih sob
aku lg ada tugas RPL bikin software sederhana
izin copas ye *demi tugas*
Posting Komentar