Been under the impression that you incur some extra overhead that can slow things down. Probably inconsequential in this circumstance I know. Reflection would be convenient, but I don't want to get lazy and start reflecting everything. Also, I will eventually need to implement some restrictions on the app (similar to the current thread about allowing the assembly to be used only from a specific exe) and am concerned that I'll put myself behind the proverbial 8-ball when those restrictions are implemented.
-----Original Message----- From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf Of Shawn Wildermuth Sent: Monday, April 22, 2002 7:26 PM To: [EMAIL PROTECTED] Subject: Re: [DOTNET] Load Form by Name 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. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.