G
Guest
Iam extending the .NET Compact Framework textbox control in order to create an advanced textbox control. I have successfully
compiled it and I was able to add it to the ToolBox. Here comes the tricky part: When I create one of this controls in the designer it doesn't look like a Compact Framework textbox, instead it looks like .NET Framework textbox. The weird thing is that it just looks like a .NET Framework control because the object has only the properties, events and methods defined for the Compact Framework textbox control. In short, internally is a Compact Framework control but the designer draws it as a regular .NET Framework Control. When I deploy an aplication containing one of those extended controls on the emulator the program simply exits with code 0, whitout drawing anything.
Any clue of what Iam doing wrong?
Here's my compiling commands:
Designing time
csc /noconfig /nologo /optimize+ /defineESIGN /target:library
/out:bin\debug\AdvancedTextBoxDesigner.dll
AdvancedTextBox.cs
/r:System.dll
/r:$DesignerPath\System.CF.Windows.Forms.dll
/r:$DesignerPath\System.CF.Design.dll
/r:$DesignerPath\System.CF.Drawing.dll
/r:System.Windows.Forms.dll
Runtime
csc /noconfig /nologo /optimize+ /target:library
/out:bin\debug\AdvancedTextBox.dll
AdvancedTextBox.cs
/r:System.dll
/r:System.Windows.Forms.dll /r:System.Data.dll
/r:System.Drawing.dll /r:System.Web.Services.dll
/r:System.XML.dll
Heres the source code of the control (only extra properties have been added):
using System;
using System.Drawing;
using System.Windows.Forms;
#if DESIGN
[assembly:System.CF.Design.RuntimeAssemblyAttribute(
"AdvancedTextBox,
Version=1.0.0.0,
Culture=neutral,
PublicKeyToken=null")]
#endif
namespace DragoSolutions.Win.Extensions
{
public class AdvancedTextBox : TextBox
{
private string m_strOriginalText;
private string m_strTextDataMember;
public AdvancedTextBox() {}
public string originalText
{
get { return m_strOriginalText; }
//set { m_strOriginalText = value; }
}
public string textDataMember
{
get { return m_strTextDataMember; }
set { m_strTextDataMember = value; }
}
}
}
Thank you for your time.
Victor Luaces.
compiled it and I was able to add it to the ToolBox. Here comes the tricky part: When I create one of this controls in the designer it doesn't look like a Compact Framework textbox, instead it looks like .NET Framework textbox. The weird thing is that it just looks like a .NET Framework control because the object has only the properties, events and methods defined for the Compact Framework textbox control. In short, internally is a Compact Framework control but the designer draws it as a regular .NET Framework Control. When I deploy an aplication containing one of those extended controls on the emulator the program simply exits with code 0, whitout drawing anything.
Any clue of what Iam doing wrong?
Here's my compiling commands:
Designing time
csc /noconfig /nologo /optimize+ /defineESIGN /target:library
/out:bin\debug\AdvancedTextBoxDesigner.dll
AdvancedTextBox.cs
/r:System.dll
/r:$DesignerPath\System.CF.Windows.Forms.dll
/r:$DesignerPath\System.CF.Design.dll
/r:$DesignerPath\System.CF.Drawing.dll
/r:System.Windows.Forms.dll
Runtime
csc /noconfig /nologo /optimize+ /target:library
/out:bin\debug\AdvancedTextBox.dll
AdvancedTextBox.cs
/r:System.dll
/r:System.Windows.Forms.dll /r:System.Data.dll
/r:System.Drawing.dll /r:System.Web.Services.dll
/r:System.XML.dll
Heres the source code of the control (only extra properties have been added):
using System;
using System.Drawing;
using System.Windows.Forms;
#if DESIGN
[assembly:System.CF.Design.RuntimeAssemblyAttribute(
"AdvancedTextBox,
Version=1.0.0.0,
Culture=neutral,
PublicKeyToken=null")]
#endif
namespace DragoSolutions.Win.Extensions
{
public class AdvancedTextBox : TextBox
{
private string m_strOriginalText;
private string m_strTextDataMember;
public AdvancedTextBox() {}
public string originalText
{
get { return m_strOriginalText; }
//set { m_strOriginalText = value; }
}
public string textDataMember
{
get { return m_strTextDataMember; }
set { m_strTextDataMember = value; }
}
}
}
Thank you for your time.
Victor Luaces.