artem_niko Posted January 19, 2020 Share Posted January 19, 2020 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 More sharing options...
Sherzod Posted January 19, 2020 Share Posted January 19, 2020 6 hours ago, Артем said: I want show my Form1 (FreeForm) in anouther position, for example, in left top corner. YourForm1.Position = poDefault ? 1 Link to comment Share on other sites More sharing options...
artem_niko Posted January 19, 2020 Author Share Posted January 19, 2020 5 hours ago, Sherzod said: YourForm1.Position = poDefault ? Yes, you are right...Now property Form1.Position = poDefaul was set in poScreenCenter. That why was not worked. Now is good! Thank you, @Sherzod! Link to comment Share on other sites More sharing options...
artem_niko Posted January 20, 2020 Author Share Posted January 20, 2020 @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: 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 More sharing options...
Sherzod Posted January 20, 2020 Share Posted January 20, 2020 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 More sharing options...
artem_niko Posted January 20, 2020 Author Share Posted January 20, 2020 43 minutes ago, Sherzod said: Can you please explain in more detail? For example: Link to comment Share on other sites More sharing options...
Sherzod Posted January 20, 2020 Share Posted January 20, 2020 21 minutes ago, Артем said: For example: And what is the problem now? Link to comment Share on other sites More sharing options...
artem_niko Posted January 20, 2020 Author Share Posted January 20, 2020 3 minutes ago, Sherzod said: And what is the problem now? Can't set params coordinate for Form1, that Form1 will be showing in left bottom corner, above Windows Taskbar... Form1 showing under taskbar. Link to comment Share on other sites More sharing options...
Sherzod Posted January 20, 2020 Share Posted January 20, 2020 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 More sharing options...
artem_niko Posted January 20, 2020 Author Share Posted January 20, 2020 4 minutes ago, Sherzod said: I do not really imagine... But maybe you need to set UniMainModule.ConstrainForms to True: UniMainModule.ConstrainForms = True From what constraint Form1 if use this property? Link to comment Share on other sites More sharing options...
Sherzod Posted January 20, 2020 Share Posted January 20, 2020 Your forms will not go beyond the main form. 1 Link to comment Share on other sites More sharing options...
artem_niko Posted January 20, 2020 Author Share Posted January 20, 2020 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: I need: 45 - this is MainForm.UniContainerPane1.Height. Help. Link to comment Share on other sites More sharing options...
Sherzod Posted January 20, 2020 Share Posted January 20, 2020 17 minutes ago, Артем said: Top:=Screen.WorkAreaHeight - (Height + 45); Top:=Screen.WorkAreaHeight - Height - 45; ?? Link to comment Share on other sites More sharing options...
artem_niko Posted January 20, 2020 Author Share Posted January 20, 2020 3 minutes ago, Sherzod said: Top:=Screen.WorkAreaHeight - (Height - 45); ?? No, with a minus the same effect, my panel value is not taken into account... Link to comment Share on other sites More sharing options...
Sherzod Posted January 20, 2020 Share Posted January 20, 2020 2 minutes ago, Sherzod said: Top:=Screen.WorkAreaHeight - Height - 45; ?? Well, basically the same thing, it should work... Link to comment Share on other sites More sharing options...
artem_niko Posted January 20, 2020 Author Share Posted January 20, 2020 Just now, Sherzod said: Well, basically the same thing, it should work... Not working! Link to comment Share on other sites More sharing options...
Sherzod Posted January 20, 2020 Share Posted January 20, 2020 10 minutes ago, Артем said: Not working! Try a little big value. Link to comment Share on other sites More sharing options...
artem_niko Posted January 20, 2020 Author Share Posted January 20, 2020 4 minutes ago, Sherzod said: Try a little big value. Was write: procedure TUniForm1.UniFormShow(Sender: TObject); begin Left:=0; Top:=Screen.WorkAreaHeight - Height - 120; end; and now normal... But why 120 - good, 45 - no.....I understand.... Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now