Click here to Skip to main content
15,921,959 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Hi ppl..short question! Pin
User 98970749-Jun-17 22:27
User 98970749-Jun-17 22:27 
GeneralRe: Hi ppl..short question! Pin
Ralf Meier10-Jun-17 0:00
mveRalf Meier10-Jun-17 0:00 
GeneralRe: Hi ppl..short question! Pin
User 989707410-Jun-17 0:09
User 989707410-Jun-17 0:09 
GeneralRe: Hi ppl..short question! Pin
Ralf Meier10-Jun-17 0:29
mveRalf Meier10-Jun-17 0:29 
GeneralRe: Hi ppl..short question! Pin
User 989707410-Jun-17 0:43
User 989707410-Jun-17 0:43 
AnswerRe: Hi ppl..short question! Pin
Ralf Meier10-Jun-17 10:18
mveRalf Meier10-Jun-17 10:18 
GeneralRe: Hi ppl..short question! Pin
User 989707411-Jun-17 1:15
User 989707411-Jun-17 1:15 
GeneralRe: Hi ppl..short question! Pin
User 989707411-Jun-17 5:13
User 989707411-Jun-17 5:13 
Here.. the full code i have now:

VB
Imports Toub.Sound.Midi
Imports System.Runtime.InteropServices

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        MidiPlayer.OpenMidi()
    End Sub

    Private Sub Form1_FormClosed(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
        MidiPlayer.CloseMidi()
    End Sub

    Private Sub Form1_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
        Dim SDrum1 As String = ComboBox2.Text
        Dim SDrum2 As String = ComboBox3.Text
        Dim keyPressed As String = e.KeyData.ToString

        Select Case keyPressed

            Case SDrum1
                Dim vol = volu.Value
                MidiPlayer.Play(New NoteOn(0, GeneralMidiPercussion.AcousticSnare, vol))

            Case SDrum2
                Dim vol = volu2.Value
                MidiPlayer.Play(New NoteOn(0, GeneralMidiPercussion.BassDrum, vol))
        End Select

    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim vol = volu.Value
        MidiPlayer.Play(New NoteOn(0, GeneralMidiPercussion.AcousticSnare, vol))
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        ComboBox3.Enabled = True
        ComboBox2.Enabled = True
    End Sub

    Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox2.SelectedIndexChanged
        ComboBox2.Enabled = False
    End Sub

    Private Sub ComboBox3_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox3.SelectedIndexChanged
        ComboBox3.Enabled = False
    End Sub
End Class


I would like to have some panning on my sounds but i find it hard..cause i cannot get any info for that in Google and by my own is complicated!

modified 7-Jan-19 21:02pm.

GeneralRe: Hi ppl..short question! Pin
Ralf Meier11-Jun-17 8:43
mveRalf Meier11-Jun-17 8:43 
GeneralRe: Hi ppl..short question! Pin
User 989707411-Jun-17 8:47
User 989707411-Jun-17 8:47 
GeneralRe: Hi ppl..short question! Pin
Ralf Meier11-Jun-17 8:51
mveRalf Meier11-Jun-17 8:51 
GeneralRe: Hi ppl..short question! Pin
User 989707411-Jun-17 9:07
User 989707411-Jun-17 9:07 
GeneralRe: Hi ppl..short question! Pin
User 989707412-Jun-17 1:35
User 989707412-Jun-17 1:35 
GeneralRe: Hi ppl..short question! Pin
Ralf Meier12-Jun-17 1:41
mveRalf Meier12-Jun-17 1:41 
GeneralRe: Hi ppl..short question! Pin
User 989707412-Jun-17 1:47
User 989707412-Jun-17 1:47 
GeneralRe: Hi ppl..short question! Pin
User 989707412-Jun-17 1:50
User 989707412-Jun-17 1:50 
GeneralRe: Hi ppl..short question! Pin
Ralf Meier12-Jun-17 2:04
mveRalf Meier12-Jun-17 2:04 
GeneralRe: Hi ppl..short question! Pin
User 989707412-Jun-17 2:17
User 989707412-Jun-17 2:17 
QuestionTo get the contionus Bill Number Pin
Annapurna anu2-Jun-17 20:18
Annapurna anu2-Jun-17 20:18 
AnswerRe: To get the contionus Bill Number Pin
Richard MacCutchan2-Jun-17 22:22
mveRichard MacCutchan2-Jun-17 22:22 
SuggestionRe: To get the contionus Bill Number Pin
Richard Deeming5-Jun-17 8:32
mveRichard Deeming5-Jun-17 8:32 
AnswerRe: To get the contionus Bill Number Pin
jsc4228-Jul-17 7:41
professionaljsc4228-Jul-17 7:41 
QuestionNeed real time list of on/off computers on lan amongst other things Pin
Member 130478152-Jun-17 19:13
Member 130478152-Jun-17 19:13 
AnswerRe: Need real time list of on/off computers on lan amongst other things Pin
OriginalGriff2-Jun-17 19:18
mveOriginalGriff2-Jun-17 19:18 
AnswerRe: Need real time list of on/off computers on lan amongst other things Pin
Dave Kreskowiak3-Jun-17 5:19
mveDave Kreskowiak3-Jun-17 5:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.