Hello all, I have a few questions and some problems. I've been doing some searching on the web and cannot find a source that can aid me with these issues.
Anyways,
I have several text box's that need to have the following properties:
Numbers-Only
Commas Ex. 1,000 instead of 1000
Able to use: Backspace,Delete,Enter
So far I have the following code for the Numbers-Only Option, but when I use this code it only allows for numbers and nothing else. It disables the Backspace,Delete features that I would like to use.
Here is what I have thus far:
private void oicTxtInc_KeyPress(object sender, KeyPressEventArgs e)
{
if (!System.Text.RegularExpressions.Regex.IsMatch(e.KeyChar.ToString(), "\\d+"))
e.Handled = true;
}
Now for the second issue.
When my program loads a Form is loaded or displayed before the main form.
private void Form1_Load(object sender, EventArgs e)
{
StartUp StDlg = new StartUp();
StDlg.ShowDialog();
}
This form displays some simply instructions on how to use my program and it contains a checkBox and is Checked by default. I would some how like to make it so when the user Un-Checks the box it does not appear at start up any more. I've seen this done in many programs that I have used in the past.
Kinda like a Tip of the day that contains a check box that is checked and once un-checked it stops showing the tips.
I just don't know how to bind the checkBox to anything to save status of it, nor do I know the correct syntax to use for this.
Any and all help is greatly appreciated.
Thanks in advance,
- Poab9200