i am now developing a LAN quizbee game for our school. I wanted now how to manipulate or process(by the other computer connected in LAN) the code that are inside a textbox that will be sent as a string. How can I?I am now using the Winsock control. Any comment will be appreciated. Thanks
for example:
i have a form which has a textbox and command button in it.
i type in the textbox(inside):
msgbox "Hello"
then i click send. Now the other computer will receive the string="msgbox="Hello""
Then it will process it and display a messagebox with the message Hello in it.
How can i do that?
how to manipulate/process code inside a string
Page 1 of 14 Replies - 634 Views - Last Post: 15 June 2012 - 06:42 AM
Replies To: how to manipulate/process code inside a string
#3
Re: how to manipulate/process code inside a string
Posted 29 May 2012 - 09:45 AM
Also, please explain more clearly what you want to "manipulate or process".
This post has been edited by BobRodes: 29 May 2012 - 09:45 AM
#4
Re: how to manipulate/process code inside a string
Posted 14 June 2012 - 09:35 PM
i think you cant use that
alternate ways is use symbol code to identify that you want show message box on other client
see my example below
[client1]
insert text like "!M hello" on textbox
then
[client2]
read string
if left(getdata,2) = "!M" then
msgbox mid(getdata,3, len(getdata) - 3)
end if
hope this would help your problem
alternate ways is use symbol code to identify that you want show message box on other client
see my example below
[client1]
insert text like "!M hello" on textbox
then
[client2]
read string
if left(getdata,2) = "!M" then
msgbox mid(getdata,3, len(getdata) - 3)
end if
hope this would help your problem
#5
Re: how to manipulate/process code inside a string
Posted 15 June 2012 - 06:42 AM
Keep in mind also that if you have quotation marks in your string, you will have to change them. Think about this: how does VB know the difference between the quotes that enclose your string and the quotes that are to be taken literally? The code
myString = "He said "Hello." to me."
will give a syntax error.
The most concise way to show that the quotes around the word "Hello" are to be taken literally is to double them, like this:
myString = "He said ""Hello."" to me."
You will need to search for quotes in your string and use string manipulation functions to double them before sending your string out.
myString = "He said "Hello." to me."
will give a syntax error.
The most concise way to show that the quotes around the word "Hello" are to be taken literally is to double them, like this:
myString = "He said ""Hello."" to me."
You will need to search for quotes in your string and use string manipulation functions to double them before sending your string out.
This post has been edited by BobRodes: 15 June 2012 - 06:43 AM
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|