How to Change the main form of an application at runtime ?
Answer / Muinuddeen Baktaber
To change the main form of an application at runtime in Delphi, you can use the Application.MainFormOnTaskbar property. Here's an example:
```
var
NewMainForm: TForm2; // assuming TForm2 is your new main form class
...
NewMainForm := TForm2.Create(nil); // create the new main form object
Application.MainFormOnTaskbar := NewMainForm; // set it as the new main form
| Is This Answer Correct ? | 0 Yes | 0 No |
How to Get a handle on your files ?
How to Change the default width/height of the editor?
How to print a TStringGrid or a TDBGrid ?
How to Use Form Wizard to Quickly Create a Delphi Form?
How to keep seconds from being included in the display when using TDateTimePicker?
How to Create a non-VCL console project?
How to Set a form's maxwidth in code?
How to Free an object stored in a list?
What should I give to Windows API functions that want a hWnd?
How does Delphi handle Windows callbacks?
Do the ADO components come with the professional version of Delphi 6?
What does the error 'Token not found'?