PDA

View Full Version : How to send messages from Visual Basic?



Harald
October 13th, 2002, 12:55 PM
Hi,

for my "daily" use I have a PRONTO which works very well together with Girder.

In addition I have a 15' touchscreen that I use e.g. to operate my Lexicon MC-1 via RS232.

Now I would want to additionally use the touchscreen to send commands to Girder. I thought I could program buttons in Visual Basic that send key combinations to Girder. I am not a VB buff, so I may have overlooked the way how to manage that. Anyone?

Or are there more effective ways or other programs to make a frontend with buttons that can send keys to Girder?

Harald
October 13th, 2002, 12:55 PM
Hi Betaspleen (I can't remember your name),

thanks for your hint - it's not quite the right way but led me to the solution: searching through the forum lead me to the posting "htpcinterface" in which a call to tcpclient is used. Since I could not find anywhere the calling sequence, the usage in the HTML code helped me a lot.

In Visual Basic it goes as follows: create a button (command1) in this case and put the following code behind it:

Private Sub Command1_Click()
Dim StrArgs As String
Dim StrCmd As String
Dim Retcode As Single

StrArgs = "passwd ip-address port string"
StrCmd = "C:ProgrammeGirder3tcpclient.exe"

Retcode = Shell(StrCmd & " " & StrArgs, vbHide)
End Sub

You have to put the actual values in passwd, etc.

If you now go into "Learn Event" in Girder and execute the VB program, the string from above will appear as captured "IR" code.
Every following call will execute the corresponding girder command.

Happy New Year to everyone,

-Harald

BeTtASpLeNdEnS
October 13th, 2002, 12:55 PM
the pb is not VB one but is how to run a command to girder through a command line...
i'm not sure, but i think i have seen that not so far...
under VB, you just have to execute a shell command "c:prog filesgirdergirder.exe _put_here_the_command_"
And with the right command (don't know which one it is.. so you can find, or wait a RonB answer too... :wink: ).

Good luck, and Happy New Year