Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Can I use a wizard without a form?
 

Can I use a wizard without a form?

Hello all,

I posted the following in  the microsoft.public.dotnet.languages.csharp newsgroup a few days ago and received zero answers.  (Where are all the "MVPs" when you need one?)  I am just trying to find out whether whether my technique is reasonable given how the IDE works or whether I am off-track and doing something stupid when there is a better way available.  I wrote:

--- begin quote --- 
I have a DB conversion app with a lightweight GUI, mainly just labels that get updated to indicate progress.  The main work (and all of the the data access) is in a separately threaded class module in the same project.  I am making heavy use of OleDbDataAdapters and it seems to be the case that I can declare a data adapter in the class module but if I do so there is no way to use the built-in wizard which initializes it, thus I would have to hand-code hundreds of lines of initialization which the wizard accomplishes with a few clicks.  So I have ended up dropping them all these adapters (dozens!) onto the GUI form and then initializing references to them in the DB access module.  This creates a completely inappropriate dependency (to me, YMMV) between the form and the class module.

This all just seems so perverse, since the only GUI aspect of the data adapter is the design-time wizard itself.  So am I simply missing something here?  Is there some way to declare the adapter in its appropriate location (the class module) and still have access to its wizard?  (I realize that that I can use the form to initialize them and then copy/paste all the generated code to the other module - but this is even more perverse, IMO.)

In case it matters, I am currently using the 1.0 framework - planning to upgrade soon, probably to the 2003 version.

Thanks,
-rick- 
--- end quote ---
MigrationUser 1  Monday, May 30, 2005 9:58 AM
Take a look at my sample project, hope it helps.

http://www.tlhdotnet.net/Default.aspx?tabid=28

First one, Strongly Typed DAL's, I've given this presentation to several user groups. It's a great EASY way to maintain a DAL (Data access Layer) and keep it seperate from the main UI form as well as allowing you to use it on several forms.
MigrationUser 1  Wednesday, June 01, 2005 11:36 PM

You can use google to search for other answers

Custom Search

More Threads

• DockStyle.Top collection renders controls in reverse order
• Designer view can't open my Form!
• Simple System.Drawing or GDI+ question: I want to make my form's corners rounded
• how to create a push pin as in VS toolbox
• progress bar in windows application till the query executes
• Can Toolstrip inherited to be changed?
• How to Stop URL in winform?
• How to set a DragIcon when a control is dragged and dropped on a designer
• Get property value at design-time
• creating custom events for combo box