I'm having some trouble with a program i'm making, everytime i try to run the form that runs this code:
Private Sub customDuffer_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles customDuffer.DoWork
While (Me.Visible = True)
For Each tone In trackWriter.noteArray
If switch = True Then
Beep.tone(1000, note, 240)
End If
Next tone
End While
Beep.tone(1000, note, 240)<< this is the line that throws the exception. i have exactly the same code on my main form and it runs perfectly everywhere else, only in the form where it is supposed to be run do i get an exception.
Note array is public and i can access it fine from everywhere else, and the custom class beep works fine. any help would be greatly appreciated.