thespazz84
New member
Hello.
Im working on a project that uses a hardware mpeg2 card to play an mpeg file when it recieved a contact closure on the serial ports CD line. One of my coworkers has used this method in the past in VB6 and I am having a hard time porting it to .net. here is snippets of my source code:
It dosnt give me any errors, but it dosnt work. what am i doing wrong
thanks
-Brandon McKenzie
Im working on a project that uses a hardware mpeg2 card to play an mpeg file when it recieved a contact closure on the serial ports CD line. One of my coworkers has used this method in the past in VB6 and I am having a hard time porting it to .net. here is snippets of my source code:
Code:
Dim ComEvCD As MSCommLib.CommEventConstants
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
MSComm.CommPort = 1
MSComm.PortOpen = True
MSComm.DTREnable = True
End Sub
Private Sub axMScomm1_OnComm(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MSComm.OnComm
Select Case MSComm.CommEvent
Case ComEvCD Change in the CD line.
If MSComm.CDHolding = True Then
mpgPlay(0, 0)
MessageBox.Show("CD closed", "mscomm32", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
End If
... more select case statements as needed
end select
end sub
It dosnt give me any errors, but it dosnt work. what am i doing wrong
thanks
-Brandon McKenzie