Incorporate one winform in several applications

Posted on 2004-11-14
Last Modified: 2010-08-05
I have one winform and I want to include that winform in several windows applications develop in  I do not want to include .resx and .vb files of that winform in each application.  I like somekind of reference  and I include that reference in teh application and it works.  I also like to have some parameters to be passed.  I do not know how to do it.  Please tell me how to do it.
Question by:tgatif
    LVL 48

    Accepted Solution

    Create Class Library project and add form to it. In other projects (clients) you need to add reference to this Class Library (see References item in the Project Explorer). Having reference to class library you can create instance of any class from it.
    LVL 9

    Assisted Solution

    you can pass parameters to a form by over wirtting the new method of the form with some thing like below

    private _strText as string

    public sub new (byval strTest as string)

            'This call is required by the Windows Form Designer.

            'Add any initialization after the InitializeComponent() call
            _strText = strTest
    end sub
    LVL 14

    Assisted Solution

    To add parameters, simply add Public or Friend scoped Properties to the Form Class.


    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Introduction When many people think of the WebBrowser ( control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
    Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now