"BadOmen" <ba*******@hotmail.com> skrev i meddelandet
news:Gu********************@newsc.telia.net...
I have just ordered a IR remote control that uses a serial port.
This is the one:
http://www.rbmods.com/Articles/Eksitdata/IRremote/1.php
There is some program out there I can use to con troll WinAmp,but i want
to make my one...
I have made a program that uses voice commands with MS Agent to control
WinAmp5 now I want to use a IR remote instead of MS Agent. I just need to
know how to receive the signal and handle it, how do I do that?
If some one could give me a start i would be glad.
Yours, Jonas
I have now got a connection to my IR reciver (Packard Bell Fast Media)
I get the connection when I press connect and I receive events with this
function MSComm1_OnComm() when I press a button on my remote.
No I want to know how to separate each button from another on the remote and
as a beginning show witch button is pressed in a txtDisplay.Text, how do I
do that??
I can se that I receive something from the remote when i press a button
because the comEvCD is called and I get a message and a shape turns green...
I have made the message and the shape that turns green, to se if somethig is
happaning...
What exactly does comEvCD check?? The "Change in the Carrier Detect line"
that is the description in the help file does not say me a thing...
This comEvDSR is called when I press the connect button in my form.
What is this comEvDSR "Change in Data Set Ready line. This event is only
fired when DSR changes from 1 to 0" From the help file...??.
How do I use comEvReceive it is never called...
I don't know if I should have the MSComm1 with InputMode = 0
comInputModeText or 1 comInputModeBinary??
I am using this setting withMSComm1 9600,n,8,1 is that ok or is it bather to
do something else?
Private Sub MSComm1_OnComm()
Select Case MSComm1.CommEvent
' Errors
Case comEventBreak ' A Break was received.
Case comEventFrame ' Framing Error
Case comEventOverrun ' Data Lost.
Case comEventRxOver ' Receive buffer overflow.
Case comEventRxParity ' Parity Error.
Case comEventTxFull ' Transmit buffer full.
Case comEventDCB ' Unexpected error retrieving DCB]
' Events
Case comEvCD ' Change in the CD line. '*** This is called when I press a
button on my remote
shpCD.BackColor = vbGreen
MsgBox "comEvCD"
shpCD.BackColor = vbRed
Case comEvCTS ' Change in the CTS line.
MsgBox "EvCTS"
Case comEvDSR ' Change in the DSR line. '*** This is called when I connect
MsgBox "comEvDSR"
Case comEvRing ' Change in the Ring Indicator.
MsgBox "comEvRing"
Case comEvReceive ' Received RThreshold # of chars.
MsgBox "comEvReceive"
txtDisplay.Text = MSComm1.Input
Case comEvSend ' There are SThreshold number of
' characters in the transmit buffer.
MsgBox "comEvSend"
Case comEvEOF ' An EOF charater was found in the input stream
MsgBox "comEvEOF"
End Select
End Sub
Yours, Jonas