As the title says, i want to make a mIRC like interface.
This is what i have right now: one form called Form1, one textbox called Text1 and another one called "main".

Dim TMPtxt As String * 50

Private Sub TextTest()
Dim tt As String
tt = Text1.Text
Select Case main
Case "whatever"
    Text1 = tt & "Whatever event"
''' more events '''
Case Else
    Text1 = tt & "I don't understand. "
End Select
End Sub

Private Sub main_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then TMPtxt = main
If KeyCode = vbKeyUp Then main = TMPtxt
End Sub

Private Sub main_Keyup(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
TextTest
main = ""
End If
End Sub

Ill be very short with the problems i encountered so far.
First: when the program starts, the Text1 textbox is selected by default and it's playing with my nerves. I have to select the "main" every time.
Second: when i press left ARROW, or down ARROW, the cursor moves like i press space... weird.
Third: when the Text1 textbox (its the big place where all the text is printed) needs to activate the Vertical Scrollbar (activated, and the multilines is also active) the cursor moves in such a way that i can't see what was typed recently and i have to scroll Text1 down. Very unpleasant.

I know the problems are very simple, but i simply can't figure them out.

First problem (in form_load):

me.show
main.Setfocus

Second:
Dunno which box we are talking about... the big multi-line one?

Third (on text1's keypress event, or whatever box you do the typing in):

if keyascii = 13 then
     keyascii = 0
     main.text = text1.text & vbcrlf & main.text
end if
' /* Or Something Like This ^ */

First thing: solved flawlessly. Thank you.

Second thing: when i press arrow UP on Text1 (the single line textbox), the text in it (it=main) becomes TMPtxt. This makes it have 50 characters and i can move 50 characters left from the beggining and when i type MELEE and then do the UP arrow, it is not recoginzed as MELEE cose it has up to 50 chars and it does an "Sorry, i dont understand response". I erased *50 fixed length string and now it woks absolutely normal. Solved.

Third thing: Keyascii is for KeyPress. I created a function for it, but i was not able to use it. I got this idea from someone:
Text1.SelStart = Len(Text1.Text) after each text intruduced in Text1 texbox. Solved

Thank you very much for the help :)
All the 3 problems are solved.
*bow*

This question has already been answered. Start a new discussion instead.