Forum Home
Press F1
 
Thread ID: 75226 2006-12-21 03:19:00 Any programmers here - VB question Pyropete (10889) Press F1
Post ID Timestamp Content User
508383 2006-12-21 03:19:00 I am programming using Visual Basic in Visual Studio 2005, and am writing some software that operates on Windows Mobile 5.0. So far so good, but I now have a little issue. I want to create a NumericUpDown control (which is a standard object) on the form - this is not a problem, except I want the control to have a decimal point on it. This is possible on the normal .NET framework, but seems to be missing on the compact framework. Has anyone come up against this, and if so, what did you do to solve it?

I would prefer not to have to write my own control, but could probably install one if I had to (are there any free ones out there????)

Hope someone can help.

Pete

BTW: apologies if this is in the wrong forum.... If so, feel free to move it.
Pyropete (10889)
508384 2006-12-21 03:24:00 Technical question so it belongs in the PressF1 forum. I've moved it for you. :) Jen (38)
508385 2006-12-22 11:31:00 You are right. The Value of NumericUpDown on NETCF is an Int16. Why don't you just use a textbox and two buttons to make up your customized one? A workaround is dividing the Value by 10 before using it, however, this leads to a small maximum value. developer (4447)
508386 2006-12-22 11:50:00 Another workaround is having two NumericUpDown's, one for that before the point, one for that after the point. You will need to do some calculations when you retrieve the value (alternatively, make up a new string from the two Value's and parse it to Double / Float). There are some other options. developer (4447)
1