C Board  

Go Back   C Board > General Programming Boards > C# Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 03-19-2008, 08:17 PM   #1
Registered User
 
Join Date: Dec 2007
Posts: 380
Get char at position in textBox

This code tells what position the cursor is in a textbox.
Let us say that this position is 10.

Now is my question, is it possible to know what character it is if any on position 9 in the textBox.
Is it possible to put the character on position 9 to a string ?


Code:
int position;
position = textBox1->SelectionStart;
Coding is offline   Reply With Quote
Old 03-19-2008, 08:42 PM   #2
Cat
Registered User
 
Join Date: May 2003
Posts: 1,199
Quote:
Originally Posted by Coding View Post
This code tells what position the cursor is in a textbox.
Let us say that this position is 10.

Now is my question, is it possible to know what character it is if any on position 9 in the textBox.
Is it possible to put the character on position 9 to a string ?


Code:
int position;
position = textBox1->SelectionStart;
textBox1.Text[9] will return a char with the value of the character in position 9.
__________________
You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.
Cat is offline   Reply With Quote
Old 03-20-2008, 09:12 AM   #3
Registered User
 
Join Date: Dec 2007
Posts: 380
thanks.
Coding is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ ini file reader problems guitarist809 C++ Programming 7 09-04-2008 06:02 AM
Sorting Linked Lists DKING89 C Programming 6 04-09-2008 07:36 AM
Need help understanding info in a header file hicpics C Programming 8 12-02-2005 12:36 PM
Unknown Memory Leak in Init() Function CodeHacker Windows Programming 3 07-09-2004 09:54 AM


All times are GMT -6. The time now is 06:58 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22