need simple VB code help
need simple VB code help
(OP)
I have VB 6.0 I haven't programmed in 10 years
I know this is not hard, but I just am having an awful time.
All I need to do is send the following out the rs232 (com 1)
scrlck scrlck uparrow esc
can someone send me source code on how to do this?
I feel stupid, but I just can't make it work.
thanks
I know this is not hard, but I just am having an awful time.
All I need to do is send the following out the rs232 (com 1)
scrlck scrlck uparrow esc
can someone send me source code on how to do this?
I feel stupid, but I just can't make it work.
thanks





RE: need simple VB code help
TTFN
RE: need simple VB code help
However as far as I know there are no standard ASCII codes for scrlck or uparrow
Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting
UK steam enthusiasts: www.essexsteam.co.uk
RE: need simple VB code help
Have fun.
RE: need simple VB code help
Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting
UK steam enthusiasts: www.essexsteam.co.uk
RE: need simple VB code help
I have had such bad luck with VB that I actually went back to QBASIC.
here is the code I an using.
10 OPEN "COM1:9600,N,8,1,CS,DS,RS" FOR RANDOM AS #1
20 PRINT #1, CHR$(176) + CHR$(176) + CHR$(214) + CHR$(27)
30 END
chr$(176) is num lock ( using this instead of scroll lock)
chr$(214) is the up arrow
chr$(27) is the esc key
my problem now is that the keypress is not being released
so instead of the pc recieving numlock numlock up arrow esc
its recieving numlock-uparrow-esc.
(much like crtl-alt-del)
but it is not releasing the keypress.
also I am getting a chr$(13) (enter key press) without asking for one.
How do I get it to release the keypress?
I would greatly appreciate some direction on this.
RE: need simple VB code help
PRINT #1, CHR$(176);CHR$(176);CHR$(214);CHR$(27);
The semicolon should send each character separately, and suppress the final (implied) <CR>
Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting
UK steam enthusiasts: www.essexsteam.co.uk
RE: need simple VB code help
the semicolon did get rid of the extra <cr>, but the keys still remain in the down state.
is there a chr$ value to release a key press?
or a command to reset the keyboard bios?
Who would have thought it was so hard to send four keystrokes out the rs232?
RE: need simple VB code help
Send it twice, it should be back where it started.
Send it too quick, it may get "debounced", with all but the first ignored.
Jay Maechtlen