Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

irc command style chat

Status
Not open for further replies.

MJB3K

Programmer
Jul 16, 2004
524
0
0
GB
Hi, how would i check for a space in a textbox when some types /nick username for example?

then it would change a caption to username??

e.g.
So in a textbox a user would type /nick MJB3K and the caption would change to MJB3K.

any ideas??



Regards,

Martin

Gaming Help And Info:
 
I would suggest using the "Change" function of the textbox, which will automatically update your label, or form or whatever you want to update. If you want to do it another way, you can use the "LostFocus" function of the textbox, which will update your other object as soon as the nickname textbox loses the focus on your application.

Private Sub Text1_Change()

label1.Caption = Text1.Text

End Sub
 
Depending on what else is in the textbox, you would have to parse the textbox to find or extract what you are looking for.

What is in your textbox besides username?

 
You could use Split function or Instr function. Both are detailed in VBHelp

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

For tsunami relief donations

'If we're supposed to work in Hex, why have we only got A fingers?'

for steam enthusiasts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top