I am not sure if this is available, but I wondered why you want to avoid reflection? That seems like the natural case for solving this.
Thanks, Shawn Wildermuth [EMAIL PROTECTED] > -----Original Message----- > From: dotnet discussion [mailto:[EMAIL PROTECTED]] > On Behalf Of Dan Souk > Sent: Monday, April 22, 2002 8:24 PM > To: [EMAIL PROTECTED] > Subject: [DOTNET] Load Form by Name > > > I really need to be able to load a form based on the name of > a string variable and don't want to have to create a kludge > of a select case. The archives only discuss a way to do this > via Reflection, which I want to avoid. > > Is this possible: > > Dim strFormName as string > Dim frm as Form > strFormName = "frmMain" > 'Translate somehow.... > Frm = Forms(strFormName) > Frm.Show > > You could do Forms.Add(strFormName) in VB6, but I don't see a > way to do this in .NET. > > Thanks for any ideas. > > ------------------------ > Dan Souk > Finna Technologies, Inc. > 2410 Lindsay Ct > West Chicago, IL 60185 > +1-630-762-8257 phone > +1-630-762-8258 fax > http://www.finnatech.com > > You can read messages from the DOTNET archive, unsubscribe > from DOTNET, or subscribe to other DevelopMentor lists at > http://discuss.develop.com. > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.