Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Location of forms at startup

Status
Not open for further replies.

pierrotsc

Programmer
Nov 25, 2007
358
US
is it possible to setup the exact location of a form on a screen at startup?
For example, i need to check that the user has at least a 1024x768 resolution, then i have 2 forms that display when the program starts. right now one form is on top of the other. i would like to have a set location for both forms.
Thanks.
PO
 
You check the screen res with screen.width and screen.height.

You can even do this in the project source before the forms are created.

Code:
begin
  Application.Initialize;
  if screen.Width < 1024 then exit;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.

Look at the forms position property in the object inspector to set the forms position at runtime.

Aaron
 
Thanks guys...this is what i needed to know...
po
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top