Setting Cursor Position in Masked Field WinForm

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:

Re: Setting Cursor Position in Masked Field WinForm

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.