|
|
| |
|
 |
BlAcKfINAl.aT Poster

Anmeldedatum: 26.07.2008 Beiträge: 162
|
Verfasst am: 28.07.2008, 17:11 |
|
|
Den code hatte ich schon , durch n Link. ABER , ich will das er den MP3 Abspielt , dessen pfad in txt_pfad ist...geht das?
also wen ich ja mit dem showopen common dialog n mp3 auswähl , kommt der pfad des mp3´s in die txtbox Txt_pfad .. will das der dan wen ich f12 drücke, das MP3 LIED abspielt , statt wie es jetzt schon funktioniert, das wav...also einfach das es so mit mp3 geht [img]http://www.vb-x.org/aolbart:/1024/id/30696371536D696C65795365743033/3B2D29[/img] Einfach statt f12 -> wav in txt_pfad play, das es auch mp3s von da playt... also ich will nur f12 drücken müssn , dan komt das lied, in txt_pfad .. weiste was ich mein?
*PUSH* is eilig =( |
|
| |
|
 |
bla Coder

Anmeldedatum: 02.05.2008 Beiträge: 267
|
Verfasst am: 28.07.2008, 17:51 |
|
|
schau dir doch mal einen post über dir -.-
so spielst du ne mp3 ab:
Visual Basic: [code]Dim sFile As String sFile = "C:test.mp3"
If mciSendString("open " & sFile & _ " type MPEGVideo alias MyMP3", 0, 0, 0) = 0 Then ' MP3 abspielen mciSendString "play MyMP3 from 0", 0, 0, 0 End If [/code]
so beendest du die:
Visual Basic: [code]mciSendString "stop MyMP3", 0, 0, 0 mciSendString "close MyMP3", 0, 0, 0[/code]
bau das doch einfach ein -.- |
|
| |
|
 |
BlAcKfINAl.aT Poster

Anmeldedatum: 26.07.2008 Beiträge: 162
|
Verfasst am: 28.07.2008, 18:43 |
|
|
Visual Basic: [code] Private Const KeyPressed As Integer = -32767
'MP3 '###################### '###################### '###################### '###################### '###################### 'API deklarieren^^
Private Declare Function mciSendString Lib "winmm.dll" _ Alias "mciSendStringA" ( _ ByVal lpszCommand As String, _ ByVal lpszReturnString As String, _ ByVal cchReturnLength As Long, _ ByVal hwndCallback As Long) As Long 'MP3 '###################### '###################### '###################### '###################### '###################### 'fertig 'als nächste wave 'und das mit Tasten
Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal nVirtKey As Long) As Integer Private Declare Function playa Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long 'wav fertig^^ 'Tasten fertig xD
Public Sub PlayWav(sFile As String) If Dir(sFile$) <> "" Then Call playa(sFile, SND_FLAG) End Sub
Private Sub cmd_add_Click() tmr_read.Enabled = False With cdlg .CancelError = True .FileName = "bla.wav" .ShowOpen
txt_pfad.Text = .FileName End With
End Sub
Private Sub Command1_Click() tmr_read.Enabled = True
End Sub
Private Sub Form_Load() tmr_read.Interval = 20 tmr_read.Enabled = True End Sub
Private Sub tmr_read_Timer() Dim HotKey As Long HotKey = vbKeyF12
If GetAsyncKeyState(HotKey) = KeyPressed Then Dim sFile As String sFile = (txt_pfad.Text) If mciSendString("open " & sFile & _ " type MPEGVideo alias MyMP3", 0, 0, 0) = 0 Then ' MP3 abspielen mciSendString "play MyMP3 from 0", 0, 0, 0 End If End If End Sub [/code]
ES GEHT NICH ABSPIELEN MIT F12 -.-* ICH PACKS NICH >.> BITTE N LETZES MAL N TIPP/LÖSUNG >.< _________________
|
|
| |
|
 |
ZiG Überflieger

Anmeldedatum: 16.04.2008 Beiträge: 421
|
Verfasst am: 29.07.2008, 07:06 |
|
|
@BlAcKfINAl.aT
1. Nicht die Posts direkt über dir quoten/zitieren. Sonst gibts irgendwann eine Verwarnung von mir.
2. Benutze für deine codes, wie bla schon gesagt hat das Raute Zeichen. 2te von rechts. Dann wird dein code leserlich dargestellt. |
|
| |
|
 |