I'm using SerialTerminal.sbp in the Samples directory. Ports and baud rates are menu items added with AddEvent as follows...
For i = 1 To 8
AddEvent("mnuPort" & i, Click, "mnuPorts_Click")
Next
For i = 0 To 4
AddEvent ("mnuBit" & i, Click, "mnuBits_Click")
Next
From what I can figure out, the values of "i" for "mnuBit" must be hard coded somewhere in the Serial2.dll, but I cannot find any documentation for this specific subject. The problem I have is that my GPS uses a baud rate of 19200, which is not one of the default baud rates that get listed in "mnuBit". It would seem easy to change the baud rate to 9600, but I cannot do that. The value of 19200 is set by the manufacturer. I assumed that the values of "i" were coming from the "bitrates" array in Sub Globals...
bitRates() = Array(300,4800,9600,19200,115200)
but now I think they actually come from Sender...
Sub mnuBits_Click 'Handles mnuBit0-4 click event
Control("mnuBit" & bitRate).Checked = False
Sender.Checked = True
bitRate = StrAt(Sender.Name,6)
End Sub
How do I find out what values Sender is using? I'm running this example on my desktop with no serial ports hooked up and the program automatically selects Com4 and baud rate of 9600, which leads me to suspect that there are hard coded values somewhere (in cyberspace?)...