Discussion:
ComboBox: negative SelectionStart, SelectionLength on tablet PC
(too old to reply)
Grim
2008-02-12 19:15:03 UTC
Permalink
We're developing a winforms app to run on XP tablets. Occasionally, we get a
InvalidArgument exception "Value of '-1992494640' is not valid for 'start'
..." when we set SelectionLength = 0. We noticed that the SelectionStart
property is always negative when the exception happens.

This problem doesn't occur on our desktop XP PCs; the SelectionLength and
SelectionStart values are set 'correctly' to zero on any PC that we run this
code on.
However, when we run this code on the tablets, SelectionLength and
SelectionStart are usually very large positive values which don't cause
exceptions, but sometimes they are large negative values (in which case we
get the exception being thrown).

Has anybody else experience this problem? Are there any resolutions to it?

thanks,
WM
Grant Collingwood
2011-05-17 02:29:27 UTC
Permalink
I had this problem as well. If found using .select() worked much better.

xxx.select(0,0)

Grant
Post by Grim
We're developing a winforms app to run on XP tablets. Occasionally, we get a
InvalidArgument exception "Value of '-1992494640' is not valid for 'start'
..." when we set SelectionLength = 0. We noticed that the SelectionStart
property is always negative when the exception happens.
This problem doesn't occur on our desktop XP PCs; the SelectionLength and
SelectionStart values are set 'correctly' to zero on any PC that we run this
code on.
However, when we run this code on the tablets, SelectionLength and
SelectionStart are usually very large positive values which don't cause
exceptions, but sometimes they are large negative values (in which case we
get the exception being thrown).
Has anybody else experience this problem? Are there any resolutions to it?
thanks,
WM
Loading...