Inherits textbox acts differently then .NET 1.1  
Author Message
Kaddy





PostPosted: Tue Jun 22 11:04:22 CDT 2004 Top

Compact >> Inherits textbox acts differently then .NET 1.1

I have a windows application that I have a class setup as:

Public Class cMyTextBox
Inherits Textbox

Sub New()
MyBase.New()
End Sub
End Class

Then, anytime in my program I use a text box I use the class cMyTextbox
instead of System.Windows.Forms.Textbox. Works great.

But, when I try to do the same thing in the compact framework, it
compiles fine while looking at the source, but when I click to look at
the actual form I get:

The variable 'TextBox1' is either undelcared or was never assigned.
Specificed cast is not valid.

When I go back and look at the source, it looks fine and still compiles
fine.

Any ideas.


Darin

*** Sent via Devdex http://www.hide-link.com/ ***
Don't just participate in USENET...get rewarded for it!

Information Technology175  
 
 
Alex





PostPosted: Tue Jun 22 11:04:22 CDT 2004 Top

Compact >> Inherits textbox acts differently then .NET 1.1 Visual inheritance is not supported in CF. Only custom controls for which
you have created a design-time counterpart will display properly in designer

--
Alex Feinman
---
Visit http://www.opennetcf.org


> I have a windows application that I have a class setup as:
>
> Public Class cMyTextBox
> Inherits Textbox
>
> Sub New()
> MyBase.New()
> End Sub
> End Class
>
> Then, anytime in my program I use a text box I use the class cMyTextbox
> instead of System.Windows.Forms.Textbox. Works great.
>
> But, when I try to do the same thing in the compact framework, it
> compiles fine while looking at the source, but when I click to look at
> the actual form I get:
>
> The variable 'TextBox1' is either undelcared or was never assigned.
> Specificed cast is not valid.
>
> When I go back and look at the source, it looks fine and still compiles
> fine.
>
> Any ideas.
>
>
> Darin
>
> *** Sent via Devdex http://www.devdex.com ***
> Don't just participate in USENET...get rewarded for it!