Reputation: 43
My program has two forms. At a certain point while running, both forms will be shown - one atop of the other. I want to be able to maximize the bottom form while focused on the front one.
I played around a bit with TForm.BorderStyle := bsNone
and ShowWindowAsync(Handle, SW_MAXIMIZE)
as it seems to be the only thing that maximizes to fullscreen.
This, however, maximizes the current and wrong form.
Is there any way to completely maximize (to fullscreen) a form from inside another one?
Upvotes: 1
Views: 152
Reputation: 43
To answer my own question:
With the help of a comment made by Tom Brunberg, I have found that although ShowWindowAsync(TheOtherForm.Handle, SW_MAXIMIZE)
does not make the form completely fullscreen, it works on removing the "Async"
.
Thus,
TForm.BorderStyle := bsNone;
ShowWindow(TheOtherForm.Handle, SW_MAXIMIZE);
is a working solution in this case.
Upvotes: 2