Jump to content

Positon Form


artem_niko

Recommended Posts

Hello!

I want show my Form1 (FreeForm) in anouther position, for example, in left top corner.

Code:

procedure TUniForm1.UniFormCreate(Sender: TObject);
begin
  Left:=Screen.WorkAreaWidth - Width;
  Top:=Screen.WorkAreaHeight - Height;
end;

not working.

Please, help me with this question. 

Link to comment
Share on other sites

@Sherzod

I want that my Form1 will be above taskbar, like when open Start in Windows 8/10.

When I pressing button - Form1 must be above windows Taskbar.

Now Form1 creating behind Taskbar:

image.thumb.png.51cfdbfd0a9ce5359af2d86a0dba6bce.png

This is my code in Form1:

procedure TUniForm1.UniFormShow(Sender: TObject);
begin
  Left:=0;
  Top:=Screen.WorkAreaHeight - Height;
end;

 

Please, help.

Link to comment
Share on other sites

4 hours ago, Артем said:

I want that my Form1 will be above taskbar, like when open Start in Windows 8/10.

When I pressing button - Form1 must be above windows Taskbar.

Now Form1 creating behind Taskbar

Can you please explain in more detail? 

Better attach a test case.

Link to comment
Share on other sites

6 minutes ago, Артем said:

Can't set params coordinate for Form1, that Form1 will be showing in left bottom corner, above Windows Taskbar...

 Form1 showing under taskbar.

I do not really imagine...

But maybe you need to set UniMainModule.ConstrainForms to True:

UniMainModule.ConstrainForms = True

 

Link to comment
Share on other sites

13 minutes ago, Sherzod said:

Your forms will not go beyond the main form

Cool! Great, working! :) Thank's.

One last question: Form1 showing good, but I need add to Form1.Top position value of custom heiht, for example, 45.

Look: 

procedure TUniForm1.UniFormShow(Sender: TObject);
begin
  Left:=0;
  Top:=Screen.WorkAreaHeight - (Height + 45);
end;

But Form1 showing ignore my value=45.

Now:

image.png.6184801ec628423e288ad5dc9364dc2a.png

I need:

image.png.8ea79fffd399ace038bec078c7ae9417.png

45 - this is MainForm.UniContainerPane1.Height.

Help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...