16-02-2008, 10:07 PM
Stomach Pulser Wrote:I will use this thread to ask questions about how different pieces of code work. No need in making new topics each time. First off:
I am adding a chat box where users input text instead of bltign it to the screen. It works successfully, but i can't make any sense of this code:
Code:frmMirage.txtInputChat.Text = MyText
If Len(MyText) > 4 Then
frmMirage.txtInputChat.SelStart = Len(frmMirage.txtInputChat.Text) + 1
End If
I am trying to figure out how it works and what everything in it means. Any tips?
textinputchat is a control on frmMirage, this is taking that text and setting it as MyText (variable).
if Len (being length) is more than 4 characters then the SelStart (cursor position in the text box) is the amount of characters that are being typed +1...
I don't see any point to the if statement, what event procedure is this from?