المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Name of a derived Form



C# Programming
07-16-2010, 04:30 PM
Hi there,

I have a problem with a drived Form.

I have FormA with a Grid on it and FormB and FormC wich are derived from FormA.
Some information of the Grid have to be loaded(in the constuctor) and saved(in the destructor) and do do this correct,
so I need the name of the derived Forms(FormB & FormC).

I tried to get the name from the callstack, but when i have a FormD which is drived from FormC,
the whole thing wont work.

It is possible to get the name of the Form(FormB, FormC or FormD) dynamically, even if it is a derived Form?

Thanks in advance