>>I have created a form in which a user can type in a message. When the user clicks a button I want to insert some text where the cursor is located in the message. For example at any time the user can click a button and it inserts the text OPTION1 in the edit field of the message.
>>
>>Any ideas
>
>You can find out the position of the cursor with .SelStart (see also .SelLength). From there, it should be possible to manipulate the EditBox.Text property, through standard string-manipulation functions.
Even better - no string manipulation needed:
this.editbox.seltext="any text or string variable you like"