mierlp Posted April 10, 2019 Share Posted April 10, 2019 Hi, The user can open the forms from within the menu. So he opens first FORM-1 then FORM-2 and then FORM-3 When he clicks on the menu option ''FORM-2'', -which is already opened, than this opened form has to be on the foreground. In VLC you can do something like : Quote if (not Assigned (Form2)) then begin Form2 := TForm2.Create(Application); end; Form2.Show; if (Assigned(Form2)) then begin ShowWindow(Form2.Handle, sw_restore); end; How can it be done in uniGui? Regards Peter Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 11, 2019 Share Posted April 11, 2019 12 hours ago, mierlp said: ...opened form has to be on the foreground. Hi, Can you try this approach? ... UniForm1.WebForm.JSInterface.JSCall('toFront', []); Quote Link to comment Share on other sites More sharing options...
mierlp Posted April 11, 2019 Author Share Posted April 11, 2019 Hi Sherzod When trying : if UniMainModule.GetFormInstance(TFormTableBank, False)<>nil then begin FormTableBank.WebForm.JSInterface.JSCall('toFront', []); end; or FormTableBank.WebForm.JSInterface.JSCall('toFront', []); is NOT working Quote Link to comment Share on other sites More sharing options...
shawdown Posted April 12, 2019 Share Posted April 12, 2019 Form2.BringToFront; ? Quote Link to comment Share on other sites More sharing options...
mierlp Posted April 12, 2019 Author Share Posted April 12, 2019 thanks...but that would be to easy and is not working Quote Link to comment Share on other sites More sharing options...
rtalmeida Posted April 12, 2019 Share Posted April 12, 2019 Here this works only when the form is fsMDIChild, and the only thing we do is: form.show; Quote Link to comment Share on other sites More sharing options...
mierlp Posted April 13, 2019 Author Share Posted April 13, 2019 thanks...that works Quote Link to comment Share on other sites More sharing options...
MVakili Posted June 27, 2021 Share Posted June 27, 2021 FormStyle :=fsStayOnTop Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.