Isn't this stupid? This is since J++.Code:frmNickname nick = new frmNickname(); nick.Show();
Is there no way to show the form object only?
Do I always have to create a new instance of the object?
The show property isn't supported unless I do this.
This could bring you in troubles:
Let's say you have a MainForm and this form shows a
new one (maybe a dialog). Perhaps you want to disable
the MainForm so that only the new form is enabled.
What would you do when you want to re-enable the first
form?
The "enabled" property is not show unless you create a
new instance of the base MainForm.
But if you do this, a new instance will first be created and
then enabled but not the first MainForm.
You can try to write a function:
This code will need the "this" object, but this is not allowedCode:public static bool Enable(bool Value) { // ... Code for enabling or disabling the form comes here }
in static methods.
Crazy! Isn't it?
Any ideas how to prevent this?
thx!




Reply With Quote