PC Review


Reply
Thread Tools Rate Thread

Converting TextBox control to TextBoxEx

 
 
Wapiti
Guest
Posts: n/a
 
      30th Aug 2004
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.



 
Reply With Quote
 
 
 
 
Peter Foot [MVP]
Guest
Posts: n/a
 
      30th Aug 2004
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/...ity/newsgroups

"Wapiti" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>
>
>



 
Reply With Quote
 
Wapiti
Guest
Posts: n/a
 
      31st Aug 2004
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

 
Reply With Quote
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      31st Aug 2004
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


"Wapiti" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
> .
> .
>
> Public Class frmMain
> Inherits System.Windows.Forms.Form
> Friend WithEvents tabMain As System.Windows.Forms.TabControl
> Friend WithEvents tpgIssue As System.Windows.Forms.TabPage
> Friend WithEvents tpgReceipt As System.Windows.Forms.TabPage
> Friend WithEvents tpgAdjustment As System.Windows.Forms.TabPage
> Friend WithEvents tpgTransfer As System.Windows.Forms.TabPage
> Friend WithEvents Label1 As System.Windows.Forms.Label
> . .
> Friend WithEvents txtIssueRecvr As OpenNETCF.Windows.Forms.TextBoxEx
>
> <System.Diagnostics.DebuggerStepThrough()> Private Sub
> InitializeComponent()
> Dim resources As System.Resources.ResourceManager = New
> System.Resources.ResourceManager(GetType(frmMain))
> . .
> Me.txtIssueRecvr = New OpenNETCF.Windows.Forms.TextBoxEx
> . .
> Me.tpgIssue.Controls.Add(Me.txtIssueRecvr)
> . .
> 'txtIssueRecvr
> '
> Me.txtIssueRecvr.Location = New System.Drawing.Point(96, 48)
> Me.txtIssueRecvr.Size = New System.Drawing.Size(128, 22)
> Me.txtIssueRecvr.Text = ""
> . .
> End Sub
>
>
> "Peter Foot [MVP]" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > 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/...ity/newsgroups
> >
> > "Wapiti" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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.
> > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using the textboxex class =?Utf-8?B?UmlnYQ==?= Microsoft Dot NET Compact Framework 3 29th Jul 2005 09:14 AM
Setting the Control source of a textbox to a query based on the valueof another textbox on the same form Joey Microsoft Access Queries 1 26th Jan 2005 03:35 AM
Re: How to move cursor from one textbox control to another textbox con Tom Ogilvy Microsoft Excel Programming 1 16th Sep 2004 03:42 PM
How to move cursor from one textbox control to another textbox con =?Utf-8?B?S01vb3JlMDA3?= Microsoft Excel Programming 0 16th Sep 2004 02:47 PM
Re: VERY STRANGE BUG? Adding a textbox control causes other textbox control to fail??? S. Justin Gengo Microsoft ASP .NET 0 16th Jul 2003 07:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:43 AM.