G
gonzalez
I have a form with a NumericUpDown control, a ToolBar and an InputPanel.
The NumricUpDown is initialized as follows:
form.MinimizeBox = false;
nud.Minimum = 0;
nud.Maximum = 1000000;
When I call the form, it is constructed from an static method (singleton
form) and I call it as follows:
int i = 50000;
decimal d = Convert.ToDecimal(i);
nud.Value = d; // set NumericUpDown control value to 50000
form.ShowDialog(); // User can set the value to 50000 or some other number
int ii = Convert.ToInt32(nud.Value); // I get the wrong value --- negative
amount
MessageBox.Show(ii.ToString());
The problem is the value I get after the user has used the InputPanel to
changed the value, I get a negative amount, as if it were overflowing.
Could someonw help me confirm my bug, or am I seeing double!
Thanks,
--Ader.
The NumricUpDown is initialized as follows:
form.MinimizeBox = false;
nud.Minimum = 0;
nud.Maximum = 1000000;
When I call the form, it is constructed from an static method (singleton
form) and I call it as follows:
int i = 50000;
decimal d = Convert.ToDecimal(i);
nud.Value = d; // set NumericUpDown control value to 50000
form.ShowDialog(); // User can set the value to 50000 or some other number
int ii = Convert.ToInt32(nud.Value); // I get the wrong value --- negative
amount
MessageBox.Show(ii.ToString());
The problem is the value I get after the user has used the InputPanel to
changed the value, I get a negative amount, as if it were overflowing.
Could someonw help me confirm my bug, or am I seeing double!
Thanks,
--Ader.