I'm using Visual Basic 5 to create a simple TCP/IP client. I have add a Winsock control to the main form of the application and can make a telnet connect to a remote host.
What i'm trying to achieve is when a menu option is selected a a sting of characters will be transmitted to the host and a response waited for. Depending on the menu option different characters are transmitted. The response will be output in a dialog box.
i have tried the following (Query is the menu option)
Private Sub Query_Click()
dim received as String
received = ""
while received = ""
` we have some data
` so lets display it
What seems to happen is that Winsock1.SendData completes OK. But data is not transmitted to the remote host. As the remote host does not send anything back till it receives an input. we get into a loop. I have noticed that Winsock1.SendData only physically transmits the data when Query_Click() functions exits. If this is how it works how can I have a function which is called by a click of a menu option which sends data waits for a response displays the result then sends some more etc etc.
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…