Xtreme Visual Basic Talk

Xtreme Visual Basic Talk (http://www.xtremevbtalk.com/)
-   Communications (http://www.xtremevbtalk.com/communications/)
-   -   Sending Ctrl Commands in Winsock (http://www.xtremevbtalk.com/communications/327310-sending-ctrl-commands-winsock.html)

mattman100 10-03-2014 03:56 PM

Sending Ctrl Commands in Winsock
 
Hello, first post.

I know how to set up Winsock and such but this is where I am stuck. How can I send this string. Press Ctrl key and T at the same time, then type 479292

When I do it in putty the final product looks like this ^T479292

Can you do this through senddata? Sendkeys maybe?

Any help is much appreciated!

dilettante 10-04-2014 12:37 PM

You mean you want to intercept control character input, insert it into a TextBox as a symbol (such as ^T), and then when you extract from the TextBox to send the text you want to parse and reconvert all ^* symbols back to control characters?

mattman100 10-06-2014 11:28 AM

There is no user input. I am creating a button bar and when a user clicks a command button it needs to send the string (CTRL+T)479292. Would I send the ctrl+T command as a hex value?

Thanks for the help,

Matt

dilettante 10-07-2014 01:20 PM

No, since you can't send "hex values." I suppose you don't understand what hex actually is.

However you can just send the string you want to send, if need be cobbling it together from a string expression that involves one of the number-to-character functions. ChrW$() is the most efficent of those, accepting a Long integer and skipping costly ANSI to Unicode conversion.

But whether you pass that function a value in decimal, octal, or hex is up to you. VB has syntax for expressing integer values in all three radixes:

Code:

ChrW$(20&)
ChrW$(&O24&)
ChrW$(&H14&)



All times are GMT -6. The time now is 09:29 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Optimisation provided by DragonByte SEO v2.0.15 (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
All site content is protected by the Digital Millenium Act of 1998. Copyright©2001-2011 MAS Media Inc. and Extreme Visual Basic Forum. All rights reserved.
You may not copy or reproduce any portion of this site without written consent.