ATOUTFOX
COMMUNAUTÉ FRANCOPHONE DES PROFESSIONNELS FOXPRO
Visual FoxPro : le développement durable

Forum AtoutFox : VFP Midi in translation from VB code   

Sujet

rss Flux RSS des derniers messages

Vous devez vous identifier pour pouvoir poser une question ou répondre.

dim. 20 mars 2022, 11h54

janflorijn
Pays-Bas Pays-Bas

atoutfox.public.association

VFP Midi in translation from VB code

Bonjour,

Qui peut m'aider à convertir le code VB ci-dessous en VFP ?

Public Declare Function midiInOpen Lib "winmm.dll" (ByRef hMidiIn As Integer, ByVal uDeviceID As Integer, ByVal dwCallback As MidiInCallback, ByVal dwInstance As Integer, ByVal dwFlags As IntegerAs Integer
    Public Delegate Function MidiInCallback(ByVal hMidiIn As Integer, ByVal wMsg As UInteger, ByVal dwInstance As Integer, ByVal dwParam1 As Integer, ByVal dwParam2 As IntegerAs Integer
    Public ptrCallback As New MidiInCallback(AddressOf MidiInProc)
    Public Const CALLBACK_FUNCTION As Integer = &H30000
    Public Const MIDI_IO_STATUS = &H20

    Function MidiInProc(ByVal hMidiIn As Integer, ByVal wMsg As UInteger, ByVal dwInstance As Integer, ByVal dwParam1 As Integer, ByVal dwParam2 As IntegerAs Integer
        If MonitorActive = True Then
            TextBox1.Invoke(New DisplayDataDelegate(AddressOf DisplayData), New Object() {dwParam1})
        End If
    End Function



Private Sub ComboBox1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
midiInOpen(hMidiIn, DeviceID, ptrCallback, 0, CALLBACK_FUNCTION Or MIDI_IO_STATUS)
midiInStart(hMidiIn)
End Sub


J'ai une piste, mais je ne peux pas aller plus loin qu'ouvrir/fermer. Impossible de lire le MIDI entrant.

J'ai quelque chose et je peux le partager, mais la chose la plus importante pour commencer est de partager le code VB.

J'ai une solution d'entrée/sortie MIDI dans VFP basée sur MIDI-OX. Je peux partager ça aussi.

Sincères salutations,
Jan Flikweert

Permalink : http://www.atoutfox.org/nntp.asp?ID=0000019959
20 179 messages dans le forum • Liste complète des messages

Publicité

Les pubs en cours :

www.atoutfox.org - Site de la Communauté Francophone des Professionnels FoxPro - v3.4.0 - © 2004-2025.
Cette page est générée par un composant COM+ développé en Visual FoxPro 9.0-SP2-HF3