Hello i have a Windows Forms application that runs on a touch screen and it has textboxes where a user inputs numbers.
When a user clicks the TextBox a virtual numpad pops up.
private void textboxClicked(object sender, EventArgs e) // this code openes the numPad
{
curTextBox = sender as TextBox; // puts all the params in the curTextBox that i declared at the top of the class
curTextBox.Text = null; // clears the textbox
vnumPadForm.Location = PointToScreen(new Point(curTextBox.Right, curTextBox.Top));
vnumPadForm.Show();
}
The problem I have is when the user clicks a textbox on the far right, the numpad goes beyond the screen so only half of it is showing.
How would I make it so that if the space between the textbox and edge of the screen is too small, the numpad would pop up on the leftside of the TextBox?
Well, I couldn't really find a solution yet.