Converting TextBox control to TextBoxEx

W

Wapiti

I've installed the OpenNETCF extended controls - and would like to convert
all of my textbox controls to TextBoxEx.

Per a previous suggestion by Peter Foot, I added a reference to
OpenNETCF.Windows.Forms to the project (tried both the Imports and Add
Reference under the Project menu).

Then closed down the designer windows and opened my form in code view. I
then did a find/replace of all occurances of "System.Windows.Forms.TextBox"
and replaced them with "OpenNETCF.Windows.Forms.TextBoxEx".

I'm getting a bunch of build errors when opening the form view window now.

Something that might make sense to you, is that the errors occur where the
textboxes are sitting in a tab page control. I don't have textboxes
anywhere else, but on tab pages, so I'm not sure if thats the issue or not.
Any ideas? Some sample errors are:

C:\Documents and Settings\All Users\Documents\Visual Studio
Projects\pdaBarcodeInterface\frmMain.vb(904): The variable 'txtDefEmployee'
is either undeclared or was never assigned.

Could not find type 'OpenNETCF.Windows.Forms.TextBoxEx'. Please make sure
that the assembly that contains this type is referenced. If this type is a
part of your development project, make sure that the project has been
successfully built.

C:\Documents and Settings\All Users\Documents\Visual Studio
Projects\pdaBarcodeInterface\frmMain.vb(898): The variable 'txtDefStockarea'
is either undeclared or was never assigned.

Could not find type 'OpenNETCF.Windows.Forms.TextBoxEx'. Please make sure
that the assembly that contains this type is referenced. If this type is a
part of your development project, make sure that the project has been
successfully built.
 
P

Peter Foot [MVP]

Sounds like the reference is missing from the project - use the Add
Reference dialog. Also OpenNETCF.Windows.Forms.dll itself references
OpenNETCF.Drawing.dll and OpenNETCF.dll so you'll need to add references to
these to your project too. Can you post a snippet of the code where these
textboxes are initialised?

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups
 
W

Wapiti

Thanks for the reply Peter,

I tried adding opennetcf, opennetcf.drawing and opennetcf.windows.forms
using the Add References dialog.

I'm very new to .net, ancient with v6 and below, but its confusing to me -
when I double click on the build error in the task list - it brings me to
the code - but none of the code is underlined as having an error.

When I build the solution (build | build solution) - all of my textboxes are
wiped out and removed from the forms.

I took a little time snipping the code from a single textbox in my app -
maybe confuses the issue - but would rather not paste the whole project
in -unless it might help.

Thanks for the help here. -Mike

Imports System
Imports System.Text
Imports System.Drawing
Imports System.Collections
Imports OpenNETCF
Imports OpenNETCF.Drawing
Imports OpenNETCF.Windows.Forms
Imports System.Windows.Forms
Imports System.Data
Imports System.Data.SqlServerCe
Imports System.Reflection.Assembly
Imports System.Diagnostics
 
C

Chris Tacke, eMVP

Have you tried creating a simply one form, one control app with a TextBoxEx?
My guess is that you're missing either the reference or your variable
declaration doesn't match the instantiation.

-Chris
 

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