Novo

Forum kao aplikacija na telefonu

Dodajte forum na početni ekran i koristite ga kao aplikaciju, sa menijem na dnu ekrana.

  • 3 odgovora
  • 5.437 pregleda

Najnovija ↓

play Midi or karaoke file 23.11.2004. u 22:05 · pre 267 meseci #1
može li da se reprodukuje .mid ili .kar file po mogućstvu bez korišćenja ActiveX-a
Re: play Midi or karaoke file 23.11.2004. u 22:11 · pre 267 meseci #2
How To Play MIDI Files Using API Functions

Code:

      Private Declare Function mciSendString Lib "winmm.dll" Alias _
         "mciSendStringA" (ByVal lpstrCommand As String, ByVal  _
         lpstrReturnString As Any, ByVal uReturnLength As Long, ByVal _
         hwndCallback As Long) As Long

      ' Modify the value of the constant "Song" with your path
            ' to "canyon.mid".
            Private Const Song As String = "C:\Windows\Media\Canyon.MID"

      Private Sub Command1_Click()
      Dim ret As Integer

         ' The following will open the sequencer with the CANYON.MID
         ' file. Canyon is the device_id.

         ret = mciSendString( _
           "open " & Song & " type sequencer alias canyon", _
           0&, 0, 0)

         ' The wait tells the MCI command to complete before returning
         ' control to the application.

         ret = mciSendString("play canyon wait", 0&, 0, 0)

         ' Close CANYON.MID file and sequencer device

         ret = mciSendString("close canyon", 0&, 0, 0)

      End Sub
Potpis
Blue Man Group
Prijavite se da biste odgovorili u ovoj temi.PrijavaRegistracija

Premeštanje teme