Atozed Forums
Activate a form from the stack - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: Activate a form from the stack (/thread-3139.html)



Activate a form from the stack - Mikael Nilsson - 04-12-2023

Hi,

In a stack of created formsĀ  (7 of them).
How do I make nr 3 the active form?


RE: Activate a form from the stack - Alexandre Machado - 04-17-2023

Calling method Show() of any IWForm makes it the active one.

You can use one of many IWApplication methods do obtain a reference to that existing form. For instance:

FindFormByName(const AFormName: string), like:

var
myForm: TIWForm;
begin
myForm := WebApplication.FindFormByName('MyForm') as TIWForm;
if Assigned(myForm) then
myForm.Show();
end;

You can also use the ActiveForms[index] property directly if you know the position of the form that you need.