|
-
Aug 18th, 2005, 10:36 PM
#1
Fanatic Member
Re: How to use Left(or something like it)
You can use the replace function to get rid of it.
strMessage = replace(strMessage, "BOX:", "")
Here's to us!
Who's like us?
Darned few, and they're all dead!
-
Aug 18th, 2005, 10:43 PM
#2
Re: How to use Left(or something like it)
 Originally Posted by demotivater
You can use the replace function to get rid of it.
strMessage = replace(strMessage, "BOX:", "")
good one sorry did not see that.
-
Aug 18th, 2005, 10:45 PM
#3
Thread Starter
Lively Member
Re: How to use Left(or something like it)
this is what im trying to do
SERVER
VB Code:
Form1.winsock.SendData "BOX:" & txtmsg.Text
Client
VB Code:
If strinput = "BOX:" Then
stroutput = Replace(incommingData, "BOX:", "")
msgbox stroutput, vbCritical, "Admin Message"
End If
-
Aug 18th, 2005, 10:46 PM
#4
Re: How to use Left(or something like it)
Or this:
VB Code:
Option Explicit
Private Sub Form_Load()
Dim t$
t = "Box: test"
MsgBox Trim(Right$(t, InStr(t, ":")))
End Sub
-
Aug 18th, 2005, 10:57 PM
#5
Thread Starter
Lively Member
Re: How to use Left(or something like it)
none of those things are working can you give me some other things?
-
Aug 18th, 2005, 10:59 PM
#6
Fanatic Member
Re: How to use Left(or something like it)
How is the variable "incomingdata" being filled?
Try something like this (assumes strinput is from winsock send data)
VB Code:
If InStr(strinput, "BOX:") > 0 Then
stroutput = Replace(strinput, "BOX:", "")
MsgBox stroutput, vbCritical, "Admin Message"
End If
Here's to us!
Who's like us?
Darned few, and they're all dead!
-
Aug 18th, 2005, 11:02 PM
#7
Thread Starter
Lively Member
Re: How to use Left(or something like it)
 Originally Posted by demotivater
How is the variable "incomingdata" being filled?
Try something like this (assumes strinput is from winsock send data)
VB Code:
If InStr(strinput, "BOX:") > 0 Then
stroutput = Replace(strinput, "BOX:", "")
MsgBox stroutput, vbCritical, "Admin Message"
End If
thanks man that works perfect
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|