I have a masked amount field in Windows Form as follows:
“9999999.99” (_______.__) which would look like:
When I launch the form, the cursor starts on the first position on the left which would be the number 1. I would like the cursor’s position to start on the first position on the right where the 9 is. It would be easier for the user to start typing from right to left as the amount field is more likely to be in 100’s position (e.g. $567.89). If the cursor’s position starts on the left, the user is forced to use the arrow key to get to the 100’s position (where the number 5 begins). I have tried the following:
set maskedTextBox1::SelectionStart to 8.
But this does not work as the “SelectionStart” keeps defaulting to 0. Manipulating the cursor position in C# is as follows:
Cursor.Position = new Point(Cursor.Position.X - 50, Cursor.Position.Y - 50);
I tried a similar command as follows:
set maskedTextBox1::Cursor to new System.Drawing.Point(50, 50).
This command however does not compile.