Click here to Skip to main content
15,890,282 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Vb6 to Vb.NET: How to pass controls Pin
GinoSoft@Yahoo.com22-Jun-08 17:25
GinoSoft@Yahoo.com22-Jun-08 17:25 
AnswerRe: Vb6 to Vb.NET: How to pass controls Pin
Guffa22-Jun-08 20:42
Guffa22-Jun-08 20:42 
QuestionOpen a windows Form from one windows app project in other windows app project Pin
C4ao521-Jun-08 8:29
C4ao521-Jun-08 8:29 
AnswerRe: Open a windows Form from one windows app project in other windows app project Pin
Christian Graus21-Jun-08 12:36
protectorChristian Graus21-Jun-08 12:36 
GeneralRe: Open a windows Form from one windows app project in other windows app project Pin
C4ao521-Jun-08 12:53
C4ao521-Jun-08 12:53 
GeneralRe: Open a windows Form from one windows app project in other windows app project Pin
Christian Graus21-Jun-08 14:59
protectorChristian Graus21-Jun-08 14:59 
GeneralRe: Open a windows Form from one windows app project in other windows app project Pin
C4ao521-Jun-08 23:48
C4ao521-Jun-08 23:48 
GeneralRe: Open a windows Form from one windows app project in other windows app project Pin
C4ao522-Jun-08 0:38
C4ao522-Jun-08 0:38 
I did find a way to do it using system.reflection.

Private Sub OpenFormFromAssembly(ByVal FormName As String)

        Dim MyAssembly As Reflection.Assembly = Reflection.Assembly.LoadFile(" Assembly to load  ")
        Dim MyTypes As Type() = MyAssembly.GetTypes
        For Each mType As Type In MyTypes
            If mType.BaseType Is GetType(Form) Then

                If mType.Name = formName Then
                    Dim o As Object = Activator.CreateInstance(mType)
                    Dim f As Form = CType(o, Form)
                    f.Show()

                End If

            End If
        Next

    End Sub



No need to declare a new form evry time you need to open it.

BTW, i will load an assembly if is active in database,if user has right to access it....

Tnx for your help.
GeneralRe: Open a windows Form from one windows app project in other windows app project Pin
Christian Graus22-Jun-08 11:34
protectorChristian Graus22-Jun-08 11:34 
GeneralRe: Open a windows Form from one windows app project in other windows app project Pin
C4ao522-Jun-08 21:29
C4ao522-Jun-08 21:29 
GeneralRe: Open a windows Form from one windows app project in other windows app project Pin
Christian Graus22-Jun-08 21:38
protectorChristian Graus22-Jun-08 21:38 
QuestionRe: Open a windows Form from one windows app project in other windows app project Pin
C4ao522-Jun-08 21:52
C4ao522-Jun-08 21:52 
AnswerRe: Open a windows Form from one windows app project in other windows app project Pin
Christian Graus22-Jun-08 21:59
protectorChristian Graus22-Jun-08 21:59 
GeneralRe: Open a windows Form from one windows app project in other windows app project Pin
C4ao522-Jun-08 22:07
C4ao522-Jun-08 22:07 
QuestionLaunching and manipulating a consolw window from a winform? Pin
Saul Johnson21-Jun-08 6:29
Saul Johnson21-Jun-08 6:29 
AnswerRe: Launching and manipulating a consolw window from a winform? Pin
Luc Pattyn21-Jun-08 7:04
sitebuilderLuc Pattyn21-Jun-08 7:04 
GeneralRe: Launching and manipulating a consolw window from a winform? Pin
Saul Johnson21-Jun-08 9:51
Saul Johnson21-Jun-08 9:51 
Questionwindow service debuging Pin
Ebube21-Jun-08 1:34
Ebube21-Jun-08 1:34 
AnswerRe: window service debuging Pin
jzonthemtn21-Jun-08 2:06
jzonthemtn21-Jun-08 2:06 
GeneralRe: window service debuging Pin
Ebube21-Jun-08 2:29
Ebube21-Jun-08 2:29 
GeneralRe: window service debuging Pin
Ebube21-Jun-08 4:43
Ebube21-Jun-08 4:43 
AnswerRe: window service debuging Pin
Eduard Keilholz21-Jun-08 7:38
Eduard Keilholz21-Jun-08 7:38 
GeneralRe: window service debuging Pin
Ebube24-Jun-08 6:36
Ebube24-Jun-08 6:36 
AnswerRe: window service debuging Pin
Ashfield21-Jun-08 7:41
Ashfield21-Jun-08 7:41 
GeneralRe: window service debuging Pin
Ebube22-Jun-08 0:27
Ebube22-Jun-08 0:27 

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.