Access a form, using a string literal?

  • Thread starter Thread starter Gerrit Snel
  • Start date Start date
G

Gerrit Snel

We have a question but we're in doubt if it's even possible or not.

The question is as follows:

Is it possible to access a form using a string literal, and if so yes?

We want to use something like this (don't mind the syntax as it obviously
doesn't work):

Form("Form1") frm = ("Form1")GetForm("Form1");

So we're able to access all the properties and methods of Form1 and not
just the methods and properties of the base class "Form".

Any help on this one is greatly appreciated!

Gerrit
 
Nothing like that will really work. I assume you are talking about running
code typed at runtime or something.
At design time you could just do:

Form1 frm = new Form1

That would give you access to all the properties and methods.

HTH

Ciaran
 
OK, thank you all
I try something else i think

Ciaran said:
Nothing like that will really work. I assume you are talking about running
code typed at runtime or something.
At design time you could just do:

Form1 frm = new Form1

That would give you access to all the properties and methods.

HTH

Ciaran
 
Back
Top