Click here to Skip to main content
15,906,626 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Keep database in program folder instead of default SQL server folder. Pin
desanti18-Jun-16 8:12
desanti18-Jun-16 8:12 
GeneralRe: Keep database in program folder instead of default SQL server folder. Pin
Gerry Schmitz18-Jun-16 8:20
mveGerry Schmitz18-Jun-16 8:20 
GeneralRe: Keep database in program folder instead of default SQL server folder. Pin
desanti18-Jun-16 9:38
desanti18-Jun-16 9:38 
GeneralRe: Keep database in program folder instead of default SQL server folder. Pin
Mycroft Holmes18-Jun-16 13:32
professionalMycroft Holmes18-Jun-16 13:32 
GeneralRe: Keep database in program folder instead of default SQL server folder. Pin
desanti18-Jun-16 14:17
desanti18-Jun-16 14:17 
GeneralRe: Keep database in program folder instead of default SQL server folder. Pin
Mycroft Holmes18-Jun-16 16:48
professionalMycroft Holmes18-Jun-16 16:48 
QuestionUse a different dll for each project's form Pin
desanti14-Jun-16 2:50
desanti14-Jun-16 2:50 
AnswerRe: Use a different dll for each project's form Pin
Dave Kreskowiak14-Jun-16 4:21
mveDave Kreskowiak14-Jun-16 4:21 
Yes it is but at a cost of increased complexity.

You'd have to create a class library project for each of your forms. The class files in those projects should be changed immediately to inherit from System.Windows.Forms.Form. It's then possible to open them up in the designer and drop controls on them.

You're also going to have to change the InitializeComponent() method in each of those forms from "private" to "public" so you can call it from the calling form. This will setup the controls on the new form so that they are visible.

You then have to go back the project that's going to use this form and add a project reference to each of the forms that this form is going to use. You then can create a new instance of the form but you're going to have to initialize it yourself, something like this:
C#
using (var newForm = new Form2.Form2())
{
    form2.InitializeComponent();
    form2.ShowDialog();
}


I don't see any benefit that outways the complexity of doing this, so what's the point?
A guide to posting questions on CodeProject

Click this: Asking questions is a skill.
Seriously, do it.

Dave Kreskowiak

GeneralRe: Use a different dll for each project's form Pin
desanti14-Jun-16 5:11
desanti14-Jun-16 5:11 
GeneralRe: Use a different dll for each project's form Pin
Dave Kreskowiak14-Jun-16 5:32
mveDave Kreskowiak14-Jun-16 5:32 
GeneralRe: Use a different dll for each project's form Pin
Eddy Vluggen14-Jun-16 7:16
professionalEddy Vluggen14-Jun-16 7:16 
GeneralRe: Use a different dll for each project's form Pin
desanti14-Jun-16 8:11
desanti14-Jun-16 8:11 
GeneralRe: Use a different dll for each project's form Pin
Eddy Vluggen14-Jun-16 10:11
professionalEddy Vluggen14-Jun-16 10:11 
QuestionVisual Basic and Access Database updating Pin
jbassmanp9-Jun-16 2:16
jbassmanp9-Jun-16 2:16 
QuestionRe: Visual Basic and Access Database updating Pin
ZurdoDev9-Jun-16 2:32
professionalZurdoDev9-Jun-16 2:32 
AnswerRe: Visual Basic and Access Database updating Pin
Dave Kreskowiak9-Jun-16 2:50
mveDave Kreskowiak9-Jun-16 2:50 
AnswerRe: Visual Basic and Access Database updating Pin
jbassmanp9-Jun-16 7:43
jbassmanp9-Jun-16 7:43 
QuestionApplication Portability Pin
BirderBob1-Jun-16 6:04
BirderBob1-Jun-16 6:04 
AnswerRe: Application Portability Pin
Dave Kreskowiak1-Jun-16 6:13
mveDave Kreskowiak1-Jun-16 6:13 
QuestionRecord does not get updated Pin
Raabi Anony30-May-16 18:19
Raabi Anony30-May-16 18:19 
AnswerRe: Record does not get updated Pin
Richard Deeming1-Jun-16 2:26
mveRichard Deeming1-Jun-16 2:26 
GeneralRe: Record does not get updated Pin
Raabi Anony1-Jun-16 16:34
Raabi Anony1-Jun-16 16:34 
GeneralRe: Record does not get updated Pin
Richard Deeming2-Jun-16 1:48
mveRichard Deeming2-Jun-16 1:48 
GeneralRe: Record does not get updated Pin
Raabi Anony2-Jun-16 17:02
Raabi Anony2-Jun-16 17:02 
GeneralRe: Record does not get updated Pin
Chris Quinn2-Jun-16 21:06
Chris Quinn2-Jun-16 21:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.