Friday 16 August 2013

Show All Forms In Project in vb.net

This code it will display all the forms in the project  just create a form and insert listbox and a button and in click event of button write this code

 Dim MyAssembly As System.Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly()
        Dim type As Type() = MyAssembly.GetTypes()
        For Each myType In type
            If myType.BaseType.FullName = "System.Windows.Forms.Form" Then
                ListBox1.Items.Add(myType.Name)
            End If
        Next

Followers