Главная страница | назад





Article #16580: Showing two forms allowing the first to retain focus

 Question and Answer Database
FAQ1580D.txt Showing two forms allowing the first to retain focus
Category :VCL
Platform :All
Product :All 32 bit
Question:
Is it possible to show a form, but allow the form showing before it
to remain focused, and still positioned behind the newly shown form?
Answer:
The follow code demonstrates showing a non auto-created form
without changing the focus of the original form.
uses Unit2;
procedure TForm1.Button1Click(Sender: TObject);
begin
Form2 := TForm2.Create(Application);
Form2.Visible := FALSE;
ShowWindow(Form2.Handle, SW_SHOWNA);
end;
7/16/98 4:31:28 PM

Last Modified: 01-SEP-99