Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Is a seperate DLL required for Designer support
 

Is a seperate DLL required for Designer support

Hello-
Some simple WinForms questions.
1) Whats the difference in the Toolbox  between the "Components" and "Windows Forms" sections?

2) If I Derive a simple class from the DataGrid and wish to have it display somewhere in the Toolbox and editable at design time - like the base DataGrid - must I compile it into a DLL?
Or can I simply add the class to a normal project and somehow get it to display in the ToolBox?

3) Where would I "Install" a derived control, say a textbox, in the Toolbox?
In Components, Windows Forms....

Thanks in advance - B
MigrationUser 1  Friday, April 18, 2003 11:41 AM
You can put the designer class in the same assembly as your derived control.  The only reason for splitting them into different assemblies would be to shrink the size of the redist (only the runtime control would be needed on an end-users computer, the designer would be needed on developer computers).

You can add the current project output to the toolbox.  You need to compile it first.  And, the designer/control will always be one compile behind (close all designers and recompile to make any changes take effect).

I usually install any of my custom controls on a custom tab in the toolbox.  That way, they're a bit easier to find if I need to remove them.
MigrationUser 1  Monday, April 21, 2003 12:51 PM
Thanks Martin.
I don't think I have a "Designer Class".
I have 2 things really:
1) A windows application with one form class
2) A "class" which dervies from a DataGrid (class myGrid : DataGrid)

I wish to use my derived grid class in the designer so I can resize, change colors etc. using a visual interface rather than code.  So, it seems to me that if I can get the derived grid into the toolbaox, I can drag it onto my form and edit it visually.  But, how do I do that if the derived class is not in a seperate compiled DLL ?

Do I need some kind of seperate "Desinger" version of my derived control???

Thanks - B
MigrationUser 1  Tuesday, April 22, 2003 9:40 AM
You can only add things to the Toolbox that are defined in a DLL.  If your class is in an EXE, there is no way to reference it on the toolbox.
MigrationUser 1  Tuesday, April 22, 2003 6:14 PM
Not to be contradictory, but I do quick and dirty tests all the time in which I add a control to the toolbox from an exe and it works just fine.  Any real code, though, I do via a DLL.

MigrationUser 1  Friday, April 25, 2003 4:40 PM

You can use google to search for other answers

Custom Search

More Threads

• scroll bar issue in MDI application
• Enabling Design Time Events
• using WinFX for a Vista Look??
• Implementing ICustomTypeDescriptor for Use at Runtime
• date validation
• PropertyGrid Reflection
• How to customize the size of the desktop icon by programming(Vista OS)?
• radio button in a datagrid
• add a form to a panel
• Newbie needs help