12-16-2005 02:46 PM
12-17-2005 01:31 AM - edited 12-17-2005 01:31 AM
I don't know of a way of inserting some characters in the middle of a text directly within the text box control (I suppose you want to do it programmatically, not consideing the case that the usr directly types into the text box): you need to retrieve text box contents and create the new text in a string and ResetTextBox with this new string.
OK, maybe there can be another way by programmatically posting some keyboard events to the textbox via FakeKeystroke or some SDK PostMessage or someting like this: I never tried it so I cannot help you for this.
Message Edited by Roberto Bozzolo on 12-17-2005 08:32 AM
12-17-2005 02:05 AM
OK it can be done with FakeKeystroke: look at the attached sample project.
12-19-2005 08:15 AM
Hi,
Both examples you provided are great.
My application only require to insert few characters, therefore, I chose function FakeKeyStroke for my app.
Thank you , I'm appreciated for your response