Forum > Beginners

BringToFront

(1/4) > >>

pascal111:
How "BringToFront" can affect on forms although forms are derived from "TForm" calls and "BringToFront" isn't a member of the same class but rather it's a member of "TApplication"?

BringToFront is in:
https://lazarus-ccr.sourceforge.io/docs/lcl/forms/tapplication.html

TForm:
https://lazarus-ccr.sourceforge.io/docs/lcl/forms/tform.html

A code from https://wiki.freepascal.org/Form_Tutorial


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TCustomForm.Show;begin  Visible := True;  BringToFront;end; 

PascalDragon:

--- Quote from: pascal111 on June 30, 2022, 06:09:25 pm ---How "BringToFront" can affect on forms although forms are derived from "TForm" calls and "BringToFront" isn't a member of the same class but rather it's a member of "TApplication"?
--- End quote ---

If you do a Ctrl+Click on BringToFront you'll see that it's in fact provided by TControl (which is one of the ancestors of TForm). If you want to access the BringToFront of the Application you need to use Application.BringToFront.

pascal111:

--- Quote ---If you do a Ctrl+Click on BringToFront you'll see that it's in fact provided by TControl (which is one of the ancestors of TForm). If you want to access the BringToFront of the Application you need to use Application.BringToFront.
--- End quote ---

Your words reveal that there are two "BringToFront"'s. Is this true?

winni:

--- Quote from: pascal111 on July 01, 2022, 04:19:26 pm ---
Your words reveal that there are two "BringToFront"'s. Is this true?

--- End quote ---

If you don't believe it:

Look into the sources.

Winni

pascal111:

--- Quote ---If you don't believe it:

Look into the sources.

--- End quote ---

Forgive me! I don't understand your English. This isn't what my reply was about.

Navigation

[0] Message Index

[#] Next page

Go to full version