Pro VB.NET 2002/2003For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
I have used this code for showing forms by using their names.it works correctly when you are working in one project,but when you have more than one project in you solution and you want to show a form from one of the other projects(although I have added that reference to my project) it does not work the code is as fallows:
Dim appName As String = Application.ProductName & "."
Dim mForm As String = "Form3"
Dim f As Form = DirectCast(Type.GetType(appName & mForm).InvokeMember(mForm, Reflection.BindingFlags.CreateInstance, Nothing, Nothing, Nothing), Form)
f.Show()
and the error is (object reference not set to an instance of object)