| |

VB & Windows APIRe: Grundlageninfos in Sachen API | |  | Autor: renni | Datum: 30.10.09 16:44 |
| Teil 2 wegen Textbegrenzung auf 5k
---
Property Get Alias() As String
Alias = mAlias
End Property
Property Let Alias(ByVal sAlias As String)
mAlias = sAlias
End Property
Property Get Title() As String
If bMP3 Then
Title = MP3info.Title
Else
Title = ""
End If
End Property
Property Let Title(ByVal sTitle As String)
If Len(sTitle) > 30 Then sTitle = Left$(sTitle, 30)
MP3info.Title = sTitle
bChanged = True
End Property
Property Get Artist() As String
If bMP3 Then
Artist = MP3info.Artist
Else
Artist = ""
End If
End Property
Property Let Artist(ByVal sArtist As String)
If Len(sArtist) > 30 Then sArtist = Left$(sArtist, 30)
MP3info.Artist = sArtist
bChanged = True
End Property
Property Get Album() As String
If bMP3 Then
Album = MP3info.Album
Else
Album = ""
End If
End Property
Property Let Album(ByVal sAlbum As String)
If Len(sAlbum) > 30 Then sAlbum = Left$(sAlbum, 30)
MP3info.Album = sAlbum
bChanged = True
End Property
Property Get IsPlaying() As Boolean
IsPlaying = bPlaying
End Property
Property Get Year() As Integer
If bMP3 Then
Year = Val(MP3info.Year)
Else
Year = -1
End If
End Property
Property Let Year(ByVal iYear As Integer)
If iYear < 1980 Then iYear = 1980
If iYear > 9999 Then iYear = 1980
MP3info.Year = iYear
bChanged = True
End Property
Property Get Comments() As String
If bMP3 Then
Comments = MP3info.Comments
Else
Comments = ""
End If
End Property
Property Let Comments(ByVal sComments As String)
If Len(sComments) > 30 Then sComments = Left$(sComments, 30)
MP3info.Comments = sComments
bChanged = True
End Property
Property Get Genre() As Byte
If bMP3 Then
Genre = MP3info.Genre
Else
Genre = -1
End If
End Property
Property Let Genre(ByVal iGenre As Byte)
If iGenre < 0 Or iGenre > 255 Then iGenre = 0
MP3info.Genre = iGenre
bChanged = True
End Property
Sub saveID3v1()
If bChanged Then Call MP3_SaveID3v1
End Sub
Property Get Duration() As String
Duration = FormatTime(mDurationMS)
End Property
Property Get DurationMS() As Long
DurationMS = mDurationMS
End Property
Private Sub mciOpen(Optional ByVal hwnd_Output As Long = 0)
' Multimedia-Datei öffnen
' Falls es sich um eine Videoausgabe handelt, erwartet die Funktion
' das Fensterhandle des Ausgabe-Controls (z.B. PictureBox oder Form)
' als 2. Parameter (hwnd_Output)
Dim sBuffer As String * 255
Dim sType As String
Dim nResult As Long
Dim sExt As String
Dim bVideo As Boolean
Dim sCmd As String
On Error Resume Next
' kurzen Dateinamen ermitteln
nResult = GetShortPathName(mPath, sBuffer, Len(sBuffer))
mPath = Left$(sBuffer, InStr(sBuffer, vbNullChar) - 1)
' Multimedia-Typ ermitteln
sType = mciGetType(mPath, bVideo)
' File öffnen
sCmd = "open """ & mPath & """ type " & sType & " alias " & mAlias
mciSendString sCmd, 0, 0, 0
DoEvents
' Zeitformat auf Millisekunden einstellen
sCmd = "set " & mAlias & " time format milliseconds"
mciSendString sCmd, 0, 0, 0
DoEvents
' Falls es sich um eine Video-Datei handelt...
If bVideo And hwnd_Output <> 0 Then
mciSendString "window " & mAlias & " handle " & CStr(hwnd_Output), 0, 0, 0
End If
End Sub
Public Sub mciPlay(Optional nFromPos As Long = 0)
' Multimedia-Datei abspielen
On Error Resume Next
Dim sCmd As String
Dim ret As Long
If nFromPos > 0 Then
sCmd = "play " & mAlias & " from " & nFromPos
Else
sCmd = "play " & mAlias
End If
ret = mciSendString(sCmd, 0, 0, 0)
If ret <> 0 Then Debug.Print ret
ret = mciSendString("set " & mAlias & " audio all on", 0, 0, 0)
If ret <> 0 Then Debug.Print ret
' mciSendString "put " & mAlias & " destination", 0, 0, 0
If iVolume <> 1000 Then Call mciSetVol(iVolume)
If iSpeed <> 1000 Then Call mciSetSpeed(iSpeed)
bPlaying = True
bPaused = False
End Sub |  |
 | Sie sind nicht angemeldet! Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.
Einloggen | Neu registrieren |
  |
|
sevISDN 1.0 
Überwachung aller eingehender Anrufe!
Die DLL erkennt alle über die CAPI-Schnittstelle eingehenden Anrufe und teilt Ihnen sogar mit, aus welchem Ortsbereich der Anruf stammt. Weitere Highlights: Online-Rufident, Erkennung der Anrufbehandlung u.v.m. Weitere InfosTipp des Monats sevWizard für VB5/6 
Professionelle Assistenten im Handumdrehen
Erstellen Sie eigene Assistenten (Wizards) im Look & Feel von Windows 2000/XP - mit allem Komfort und zwar in Windeseile :-) Weitere Infos
|
|
|
Copyright ©2000-2025 vb@rchiv Dieter Otter Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.
Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel
|
|