Can't get TextBoxEx Numeric working

H

Hank

I must be doing something wrong with the OpenNETCF TextBoxEx control.

I've set the TextBoxStyle property to Numeric. When I type letters in the
textbox, letters appear. Same problem with the other styles.

public MyConstructor()
{
InitializeComponent();
txtOpenNETCF_TextBoxEx.Style = TextBoxStyle.Numeric;
}

I installed the control on the toolbar and dragged it onto the form

I didn't run the .msi installer for the binaries on my machine. Could this
be the cause? (I would hope not) I just copied the
OpenNETCF.Windows.Forms.dll into the Windows CE dir, and the corresponding
dll and xml files in the Designer dir -- copied them from another machine
where I ran the .msi installers.

Thanks,
Hank
 
H

Hank

Was using Application.Run(form) in my Main(). Just now switched to
ApplicationEx.Run(form), if that's what you mean, and I still have the same
problem. Didn't know about ApplicationEx.
 
S

stic

Try to look at the TextBoxEx source code at OpenNETCF - not every function
which could be executed has implementation :(
 
H

Hank

My device is an iPaq 1900 series.

Strange. I created a new project and TextBoxEx works for Numeric there (both
device and emulators). But it still won't work on the project I've been
working on and of course, need it to work on. I've tried deleting the
TextBoxEx control from the form, removing all OpenNETCF stuff on the
toolbar, removing all references to OpenNETCF, closing VStudio, and then
re-adding the TextBoxEx to the toolbar and the reference in the project. No
go. Doesn't work on emulators either.

The TextBoxEx control is on a tabpage, so I added a new one just directly on
a form (different form) to see if maybe being on a tabpage made a
difference, but it still didn't work. I'm making sure I'm setting the style
property to Numeric. I've tried setting that property in the constructor and
in the load event.

I really don't see anything exceptional about my project. I've switched from
using ApplicationEx.Run() and Application.Run() and no difference. The only
thing in my project that's a little different is a reference to an Oracle
Lite dll.

I've soft resetted the device, deleted application folder on the device --
everything I can think of. Somehow it must be something about my project,
because that the only place it doesn't work.

Nifty control, would really like to use it in several places in my app.

Hank
 
P

Peter Foot [MVP]

It may be a timing issue with when the control is created and hence whether
the handle is valid - if it isn't created at the time the handle is accessed
it may return an invalid handle and the message to set the input mode may
fail. Try removing the code to set the Style from the designer code and call
it in Form_Load instead.

Peter
 
H

Hank

I tried putting it in the load event, same problem. I take it you wanted to
see Style get set later, so I took it to the extreme and moved it to a
button and set it from there manually. Same problem.
Hank

It may be a timing issue with when the control is created and hence whether
the handle is valid - if it isn't created at the time the handle is accessed
it may return an invalid handle and the message to set the input mode may
fail. Try removing the code to set the Style from the designer code and call
it in Form_Load instead.

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top