473,396 Members | 1,923 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

design usertextbox

Hello,
I made a library for classA which inherits from textbox. If I dim and
controls.add that in an application it works as expected. But I would like
to see my textbox in designmode. How do I go about that?
Just customizing the vb.net toolbox with the dll gives the error 'not
recognized as COM server'.
I use the standard VB installation (I made the dll by replacing 'winexe' in
the vbproj file by 'library').
Thanks for your help
Frank
Nov 20 '05 #1
5 1540
* "Frank" <fr***@frank.com> scripsit:
I made a library for classA which inherits from textbox. If I dim and
controls.add that in an application it works as expected. But I would like
to see my textbox in designmode. How do I go about that?
Just customizing the vb.net toolbox with the dll gives the error 'not
recognized as COM server'.
I use the standard VB installation (I made the dll by replacing 'winexe' in
the vbproj file by 'library').


Did you add the class library project to your solution? Are you sure
the project references are set (see context menu of the projects in
solution explorer)?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
Take a look at:
http://www.fawcette.com/vsm/2004_03/...ettingstarted/

Not sure what you are saying you tried, but don't editing your .vbproj file
in a text editor. Just create a new Class Library project. Add references
to System.Windows.Forms and System.Drawing.

Here is some code from a simple custom Label control I made. It adds to my
toolbox without error.

HTH,
Greg
Imports System.Windows.Forms

<System.Drawing.ToolboxBitmap(GetType(System.Windo ws.Forms.Label))> _
Public Class DisplayBox
Inherits System.Windows.Forms.Label

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call
'UseMnemonic = False
End Sub

'UserControl1 overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
components = New System.ComponentModel.Container
End Sub

#End Region

Private m_ForeColor As System.Drawing.Color = System.Drawing.Color.Blue
Private m_BackColor As System.Drawing.Color =
System.Drawing.SystemColors.Window
Private m_BorderStyle As BorderStyle = BorderStyle.FixedSingle

<System.ComponentModel.DefaultValue(GetType(System .Drawing.Color),
"Blue")> _
Public Overrides Property ForeColor() As System.Drawing.Color
Get
Return m_ForeColor
End Get
Set(ByVal Value As System.Drawing.Color)
m_ForeColor = Value
End Set
End Property

<System.ComponentModel.DefaultValue(GetType(System .Drawing.Color),
"Window")> _
Public Overrides Property BackColor() As System.Drawing.Color
Get
Return m_BackColor
End Get
Set(ByVal Value As System.Drawing.Color)
m_BackColor = Value
End Set
End Property
<System.ComponentModel.DefaultValue(GetType(System .Windows.Forms.BorderStyle
), "FixedSingle")> _
Public Overrides Property BorderStyle() As
System.Windows.Forms.BorderStyle
Get
Return m_BorderStyle
End Get
Set(ByVal Value As System.Windows.Forms.BorderStyle)
m_BorderStyle = Value
End Set
End Property

End Class
Nov 20 '05 #3
Greg, as I said I have the standard VB version so I cannot create a library
project. VB standard does not have that choice.
Frank

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:#Y**************@TK2MSFTNGP11.phx.gbl...
Take a look at:
http://www.fawcette.com/vsm/2004_03/...ettingstarted/

Not sure what you are saying you tried, but don't editing your .vbproj file in a text editor. Just create a new Class Library project. Add references to System.Windows.Forms and System.Drawing.

Here is some code from a simple custom Label control I made. It adds to my toolbox without error.

HTH,
Greg
Imports System.Windows.Forms

<System.Drawing.ToolboxBitmap(GetType(System.Windo ws.Forms.Label))> _
Public Class DisplayBox
Inherits System.Windows.Forms.Label

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call
'UseMnemonic = False
End Sub

'UserControl1 overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
components = New System.ComponentModel.Container
End Sub

#End Region

Private m_ForeColor As System.Drawing.Color = System.Drawing.Color.Blue Private m_BackColor As System.Drawing.Color =
System.Drawing.SystemColors.Window
Private m_BorderStyle As BorderStyle = BorderStyle.FixedSingle

<System.ComponentModel.DefaultValue(GetType(System .Drawing.Color),
"Blue")> _
Public Overrides Property ForeColor() As System.Drawing.Color
Get
Return m_ForeColor
End Get
Set(ByVal Value As System.Drawing.Color)
m_ForeColor = Value
End Set
End Property

<System.ComponentModel.DefaultValue(GetType(System .Drawing.Color),
"Window")> _
Public Overrides Property BackColor() As System.Drawing.Color
Get
Return m_BackColor
End Get
Set(ByVal Value As System.Drawing.Color)
m_BackColor = Value
End Set
End Property
<System.ComponentModel.DefaultValue(GetType(System .Windows.Forms.BorderStyle ), "FixedSingle")> _
Public Overrides Property BorderStyle() As
System.Windows.Forms.BorderStyle
Get
Return m_BorderStyle
End Get
Set(ByVal Value As System.Windows.Forms.BorderStyle)
m_BorderStyle = Value
End Set
End Property

End Class

Nov 20 '05 #4

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2k************@uni-berlin.de...
* "Frank" <fr***@frank.com> scripsit:
I made a library for classA which inherits from textbox. If I dim and
controls.add that in an application it works as expected. But I would like to see my textbox in designmode. How do I go about that?
Just customizing the vb.net toolbox with the dll gives the error 'not
recognized as COM server'.
I use the standard VB installation (I made the dll by replacing 'winexe' in the vbproj file by 'library').


Did you add the class library project to your solution? Are you sure
the project references are set (see context menu of the projects in
solution explorer)?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>


Herfried,
I get the impression from your answer that I am on the right track.
But do u have 2 questions or is it the same question asked twice?
In sol explorer/references I see my DLL. Should I also put it at another
place? More precisely: is adding my library to the solution something else
then setting it in the project references?
Thanks
Frank
Nov 20 '05 #5
Oh, sorry I misunderstood. I took you literally, which of course is not the
"standard" way to "install" a dll. Unless, it appears, you are running VB
Standard Edition. :^)
I use the standard VB installation (I made the dll by replacing 'winexe' in
the vbproj file by 'library').
"Frank" <fr***@frank.com> wrote in message
news:cb**********@news3.tilbu1.nb.home.nl... Greg, as I said I have the standard VB version so I cannot create a library project. VB standard does not have that choice.
Frank

Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

43
by: grz02 | last post by:
Hi, Im an experienced database+software designer and developer, but, unfortunately, anything to do with web-programming and web-systems designs is still a pretty new area to me... (been working...
3
by: zlst | last post by:
Many technological innovations rely upon User Interface Design to elevate their technical complexity to a usable product. Technology alone may not win user acceptance and subsequent marketability....
0
by: Edward Diener | last post by:
In Borland's VCL it was possible to divide a component into design time and run time DLLs. The design time DLL would only be necessary when the programmer was setting a component's properties or...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
2
by: Paul Cheetham | last post by:
Hi, I have moved an application from VS2003 to VS2005, and I am now unable to view most of my forms in the designer. The majority of the forms in my project are derived from class PACForm,...
1
by: Nogusta123 | last post by:
Hi, I have had a lot of problems getting web pages, master pages and content pages to render in VS2005 design view the same as they would in Internet Explorer. I did a lot of looking on the...
0
by: YellowFin Announcements | last post by:
Introduction Usability and relevance have been identified as the major factors preventing mass adoption of Business Intelligence applications. What we have today are traditional BI tools that...
19
by: neelsmail | last post by:
Hi, I have been working on C++ for some time now, and I think I have a flair for design (which just might be only my imagination over- stretched.. :) ). So, I tried to find a design...
10
by: vital | last post by:
Hi, I am designing the middle tier of a project. It has 6 classes and microsoft application data access block. The six classes are DBServices, Logger, ProjectServices ... etc. and all these...
4
by: Ken Fine | last post by:
I've been living with a frustrating issue with VS.NET for some months now and I need to figure out what the problem is. Hopefully someone has run into the same issue and can suggest a fix. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.