I'm on compact framework on WinCE

the code

----------------------------------------------------
// Par.Offset == 75000 and is an int

decimal pippo = Par.Offset;
// now pippo == 75000

numericUpDownOffset.Value = pippo;
// now numericUpDownOffset.Value == 9464
----------------------------------------------------

Why?????
numericUpDownOffset.Maximum = 1000000000
numericUpDownOffset.Minimum = 0
numericUpDownOffset.Increment = 1

Is it a bug?

Re: Help me, problem with NumericUpDown.Value by nicowyow

nicowyow
Mon Nov 06 07:23:32 CST 2006

I don't know what this numericUpDownOffset.Value is, but you should
check it is an signed int32...

if you put an signed value into an unsigned, it could freak like the
way you are describing...

Beorne wrote:
> I'm on compact framework on WinCE
>
> the code
>
> ----------------------------------------------------
> // Par.Offset == 75000 and is an int
>
> decimal pippo = Par.Offset;
> // now pippo == 75000
>
> numericUpDownOffset.Value = pippo;
> // now numericUpDownOffset.Value == 9464
> ----------------------------------------------------
>
> Why?????
> numericUpDownOffset.Maximum = 1000000000
> numericUpDownOffset.Minimum = 0
> numericUpDownOffset.Increment = 1
>
> Is it a bug?


Re: Help me, problem with NumericUpDown.Value by Fabien

Fabien
Mon Nov 06 14:27:39 CST 2006

Hi

Try to use Text property instead of value.

BR


Fabien Decret
Windows Embedded Consultant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/

nicowyow@gmail.com a =E9crit :

> I don't know what this numericUpDownOffset.Value is, but you should
> check it is an signed int32...
>
> if you put an signed value into an unsigned, it could freak like the
> way you are describing...
>
> Beorne wrote:
> > I'm on compact framework on WinCE
> >
> > the code
> >
> > ----------------------------------------------------
> > // Par.Offset =3D=3D 75000 and is an int
> >
> > decimal pippo =3D Par.Offset;
> > // now pippo =3D=3D 75000
> >
> > numericUpDownOffset.Value =3D pippo;
> > // now numericUpDownOffset.Value =3D=3D 9464
> > ----------------------------------------------------
> >
> > Why?????
> > numericUpDownOffset.Maximum =3D 1000000000
> > numericUpDownOffset.Minimum =3D 0
> > numericUpDownOffset.Increment =3D 1
> >=20
> > Is it a bug?


Re: Help me, problem with NumericUpDown.Value by Ilya

Ilya
Mon Nov 06 20:00:35 CST 2006

No, it's not a bug. On NETCF numeric up/down control is limited to signed 16
bit value since underlying native control is limited to this range.

75000 is outside the range and thus truncated: 75000=124F8h=>24F8h=9464


--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

"Beorne" <matteo.dt@gmail.com> wrote in message
news:1162813781.284298.270800@h48g2000cwc.googlegroups.com...
> I'm on compact framework on WinCE
>
> the code
>
> ----------------------------------------------------
> // Par.Offset == 75000 and is an int
>
> decimal pippo = Par.Offset;
> // now pippo == 75000
>
> numericUpDownOffset.Value = pippo;
> // now numericUpDownOffset.Value == 9464
> ----------------------------------------------------
>
> Why?????
> numericUpDownOffset.Maximum = 1000000000
> numericUpDownOffset.Minimum = 0
> numericUpDownOffset.Increment = 1
>
> Is it a bug?
>



Re: Help me, problem with NumericUpDown.Value by Buthrakaur

Buthrakaur
Tue Nov 07 02:08:14 CST 2006

I ran on this issue yesterday. Can you tell me, why you refuse to call
it bug? If it's a "feature" (as MS usually says), why does the Value
property has decimal and not int16 type?? This is really confusing and
unprofessional :(((


Ilya Tumanov [MS] napsal:
> No, it's not a bug. On NETCF numeric up/down control is limited to signed 16
> bit value since underlying native control is limited to this range.
>
> 75000 is outside the range and thus truncated: 75000=124F8h=>24F8h=9464
>
>
> --
> Best regards,
>
> Ilya
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> *** Want to find answers instantly? Here's how... ***
>
> 1. Go to
> http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
> 2. Type your question in the text box near "Search this group" button.
> 3. Hit "Search this group" button.
> 4. Read answer(s).
>
> "Beorne" <matteo.dt@gmail.com> wrote in message
> news:1162813781.284298.270800@h48g2000cwc.googlegroups.com...
> > I'm on compact framework on WinCE
> >
> > the code
> >
> > ----------------------------------------------------
> > // Par.Offset == 75000 and is an int
> >
> > decimal pippo = Par.Offset;
> > // now pippo == 75000
> >
> > numericUpDownOffset.Value = pippo;
> > // now numericUpDownOffset.Value == 9464
> > ----------------------------------------------------
> >
> > Why?????
> > numericUpDownOffset.Maximum = 1000000000
> > numericUpDownOffset.Minimum = 0
> > numericUpDownOffset.Increment = 1
> >
> > Is it a bug?
> >


Re: Help me, problem with NumericUpDown.Value by nicowyow

nicowyow
Tue Nov 07 03:38:10 CST 2006

its not a bug because it does exactly what it should do. "Why did they
make it a int16?" is a good question indeed, but its just not a bug. I
think they will change it in the next netcf

.net 3.0
http://windowssdk.msdn.microsoft.com/en-us/library/system.windows.forms.numericupdown.aspx

and maybe this can help you out:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=610159&SiteID=1



Buthrakaur schreef:

> I ran on this issue yesterday. Can you tell me, why you refuse to call
> it bug? If it's a "feature" (as MS usually says), why does the Value
> property has decimal and not int16 type?? This is really confusing and
> unprofessional :(((
>
>
> Ilya Tumanov [MS] napsal:
> > No, it's not a bug. On NETCF numeric up/down control is limited to signed 16
> > bit value since underlying native control is limited to this range.
> >
> > 75000 is outside the range and thus truncated: 75000=124F8h=>24F8h=9464
> >
> >
> > --
> > Best regards,
> >
> > Ilya
> >
> > This posting is provided "AS IS" with no warranties, and confers no rights.
> >
> > *** Want to find answers instantly? Here's how... ***
> >
> > 1. Go to
> > http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
> > 2. Type your question in the text box near "Search this group" button.
> > 3. Hit "Search this group" button.
> > 4. Read answer(s).
> >
> > "Beorne" <matteo.dt@gmail.com> wrote in message
> > news:1162813781.284298.270800@h48g2000cwc.googlegroups.com...
> > > I'm on compact framework on WinCE
> > >
> > > the code
> > >
> > > ----------------------------------------------------
> > > // Par.Offset == 75000 and is an int
> > >
> > > decimal pippo = Par.Offset;
> > > // now pippo == 75000
> > >
> > > numericUpDownOffset.Value = pippo;
> > > // now numericUpDownOffset.Value == 9464
> > > ----------------------------------------------------
> > >
> > > Why?????
> > > numericUpDownOffset.Maximum = 1000000000
> > > numericUpDownOffset.Minimum = 0
> > > numericUpDownOffset.Increment = 1
> > >
> > > Is it a bug?
> > >