M
Mobile Boy 36
I read the articles http://www.intelliprog.com/articles/index.html and the
Microsoft Simple chart demo...
But without success...By the way, I'm using VB.net...
Does someone have a complete document describing how to add a control
(written in Vb.NET or eventually in C#) to the controlbox of Visual Studio?
The control MyTextBox is a textbox that inherits from the TextBox class and
adds 2 properties...
It's working fine when I create the control at runtime...
My aim is to put 'MyTextBox' on the VS toolbar. but how do you do this??????
Please can someone help...
I was using the commandline compliler vbc from within a batchfile
"BuildMyControl.bat" to make
the Design.MyTextBox.dll but this does not succeed.
The folowing files are located in one directory:
BuildMyControl.bat
MyTextBox.dll
MyTextBox.vb
System.CF.Design.dll
System.CF.Drawing.DLL
System.CF.Windows.Forms.dll
In C# you have to add something like
#If NETCFDESIGNTIME Then
[
System.ComponentModel.Category("Colours"),
System.ComponentModel.Description("This our colours")
]
#End If
What is the equivalent in VB ?
THIS IS MY CODE (What is wrong with it? The compiler from Visual Studio
doesn't repport errors)
#If NETCFDESIGNTIME Then
[assembly: System.CF.Design.RuntimeAssemblyAttribute("MyTextBoxControl,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")]
#End If
Namespace MyTextBoxControl
Public Class cdaTextBox
Inherits TextBox
#Region "Private data members"
Private mFocusColor As System.Drawing.Color =
System.Drawing.Color.Blue
Private mFocusTextColor As System.Drawing.Color =
System.Drawing.Color.Yellow
Private mOriginalColor As System.Drawing.Color
Private mOrinalTextColor As System.Drawing.Color
#End Region
#Region "Properties!"
#If NETCFDESIGNTIME Then
[
System.ComponentModel.Category("Colours"),
System.ComponentModel.Description("This our colours")
]
#End If
Property FocusColor() As System.Drawing.Color
Get
FocusColor = mFocusColor
End Get
Set(ByVal Value As System.Drawing.Color)
mFocusColor = Value
End Set
End Property
#If NETCFDESIGNTIME Then
[
System.ComponentModel.Category("Colours"),
System.ComponentModel.Description("This our colours")
]
#End If
Property FocusTextColor() As System.Drawing.Color
Get
FocusTextColor = mFocusTextColor
End Get
Set(ByVal Value As System.Drawing.Color)
mFocusTextColor = Value
End Set
End Property
#End Region
Protected Overrides Sub onGotFocus(ByVal e As System.EventArgs)
mOriginalColor = Me.BackColor
mOrinalTextColor = Me.ForeColor
Me.BackColor = mFocusColor
Me.ForeColor = mFocusTextColor
End Sub
Protected Overrides Sub onLostFocus(ByVal e As System.EventArgs)
Me.BackColor = mOriginalColor
Me.ForeColor = mOrinalTextColor
End Sub
End Class
End Namespace
Best regards,
Mobile Boy
Microsoft Simple chart demo...
But without success...By the way, I'm using VB.net...
Does someone have a complete document describing how to add a control
(written in Vb.NET or eventually in C#) to the controlbox of Visual Studio?
The control MyTextBox is a textbox that inherits from the TextBox class and
adds 2 properties...
It's working fine when I create the control at runtime...
My aim is to put 'MyTextBox' on the VS toolbar. but how do you do this??????
Please can someone help...
I was using the commandline compliler vbc from within a batchfile
"BuildMyControl.bat" to make
the Design.MyTextBox.dll but this does not succeed.
The folowing files are located in one directory:
BuildMyControl.bat
MyTextBox.dll
MyTextBox.vb
System.CF.Design.dll
System.CF.Drawing.DLL
System.CF.Windows.Forms.dll
In C# you have to add something like
#If NETCFDESIGNTIME Then
[
System.ComponentModel.Category("Colours"),
System.ComponentModel.Description("This our colours")
]
#End If
What is the equivalent in VB ?
THIS IS MY CODE (What is wrong with it? The compiler from Visual Studio
doesn't repport errors)
#If NETCFDESIGNTIME Then
[assembly: System.CF.Design.RuntimeAssemblyAttribute("MyTextBoxControl,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")]
#End If
Namespace MyTextBoxControl
Public Class cdaTextBox
Inherits TextBox
#Region "Private data members"
Private mFocusColor As System.Drawing.Color =
System.Drawing.Color.Blue
Private mFocusTextColor As System.Drawing.Color =
System.Drawing.Color.Yellow
Private mOriginalColor As System.Drawing.Color
Private mOrinalTextColor As System.Drawing.Color
#End Region
#Region "Properties!"
#If NETCFDESIGNTIME Then
[
System.ComponentModel.Category("Colours"),
System.ComponentModel.Description("This our colours")
]
#End If
Property FocusColor() As System.Drawing.Color
Get
FocusColor = mFocusColor
End Get
Set(ByVal Value As System.Drawing.Color)
mFocusColor = Value
End Set
End Property
#If NETCFDESIGNTIME Then
[
System.ComponentModel.Category("Colours"),
System.ComponentModel.Description("This our colours")
]
#End If
Property FocusTextColor() As System.Drawing.Color
Get
FocusTextColor = mFocusTextColor
End Get
Set(ByVal Value As System.Drawing.Color)
mFocusTextColor = Value
End Set
End Property
#End Region
Protected Overrides Sub onGotFocus(ByVal e As System.EventArgs)
mOriginalColor = Me.BackColor
mOrinalTextColor = Me.ForeColor
Me.BackColor = mFocusColor
Me.ForeColor = mFocusTextColor
End Sub
Protected Overrides Sub onLostFocus(ByVal e As System.EventArgs)
Me.BackColor = mOriginalColor
Me.ForeColor = mOrinalTextColor
End Sub
End Class
End Namespace
Best regards,
Mobile Boy