Recent

Author Topic: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem  (Read 11281 times)

sam707

  • Guest
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #15 on: August 15, 2017, 04:38:10 pm »
i do prefer chessmate becuz im born to be alive, mister @T  :-X

sam707

  • Guest
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #16 on: August 15, 2017, 04:40:26 pm »
@Ondrej thanks for the LCLRealFormBounds $define point, i am gonna add that one to all my old windoz projects, because it is the NORM. a norm needing a define? whatever LoOoL

for other projects (multiplatfarms with eggs and sheeps) im gona use my tricks

chessmate two  :P
« Last Edit: August 15, 2017, 04:45:32 pm by sam707 »

sam707

  • Guest
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #17 on: August 15, 2017, 04:51:17 pm »
achording to my wifey saying

"there is nothing rong with you babe, you're just an old wolf programming cool stuffs and watching kidos programming futuristic dampers in the dark"

ENJOY

sam707

  • Guest
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #18 on: August 16, 2017, 02:59:47 am »
just found out a nice way to turn around

I share this here in the hope it helps, I dont know if it works on mac/linux but it should be multifarms LoL

to retrieve real bounds of a form here is my snippet

Code: Pascal  [Select][+][-]
  1.  
  2. uses
  3.   InterfaceBase; // access current widgetset in use
  4.  
  5.  
  6. procedure TMainForm.GetTrueSizes(out trueWidth,trueHeight: integer);
  7. var
  8.   r: TRect;
  9. begin
  10.   WidgetSet.GetWindowRect(Handle,r);
  11.   trueWidth:=r.Right-r.Left;
  12.   trueHeight:=r.Bottom-r.Top;
  13. end;
  14.  
  15. procedure TMainForm.FormCreate(Sender: TObject);
  16. var
  17.   trueW,trueH: integer;
  18. begin
  19.   GetTrueSizes(trueW,trueH); // get the OS decorated Form sizes
  20.     SetBounds(Screen.WorkAreaRect.Right-trueW,
  21.   Screen.WorkAreaRect.Bottom-trueH,Width,Height);
  22.   // place Form on bottom right of current screen
  23.  
  24.  
« Last Edit: August 16, 2017, 03:03:18 am by sam707 »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9912
  • Debugger - SynEdit - and more
    • wiki
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #19 on: August 16, 2017, 04:52:27 am »

Pascal

  • Hero Member
  • *****
  • Posts: 932
« Last Edit: August 16, 2017, 09:48:27 am by Pascal »
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #21 on: August 16, 2017, 10:18:38 am »
sam707. What's wrong with you? Please read http://wiki.freepascal.org/Lazarus_1.8.0_release_notes. Especially the "LCL changes -> TCustomForm" part .
I couldn't make it work! What do i have to do? Add -dLCLRealFormBounds to compile options?
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Ondrej Pokorny

  • Full Member
  • ***
  • Posts: 220
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #22 on: August 16, 2017, 10:46:31 am »
sam707. What's wrong with you? Please read http://wiki.freepascal.org/Lazarus_1.8.0_release_notes. Especially the "LCL changes -> TCustomForm" part .
I couldn't make it work! What do i have to do? Add -dLCLRealFormBounds to compile options?

Best is to add it to additions and overrides in your project options. Make sure the LCL/LCLBase is compiled with -dLCLRealFormBounds.

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #23 on: August 16, 2017, 11:18:21 am »
Thanks, that did it. But the values does not seem to be correct.
Especially the diff to the with: 16 is more then i would expect. In a magnified screenhot i can count 2.
« Last Edit: August 16, 2017, 02:13:10 pm by Pascal »
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #24 on: August 16, 2017, 11:48:06 am »
ClientToScreen also does not seem to work correct. See updated sample project.
« Last Edit: August 16, 2017, 12:27:29 pm by Pascal »
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #25 on: August 16, 2017, 03:18:26 pm »
According screenshot the client width and height are okay.
Also ClientToScreen and Form.Top.
But not Form.Left.
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #26 on: August 16, 2017, 03:31:55 pm »
I positioned the Form by setting Top and Left to 0. This is what you get:
- From.Left is wrong
- Form.Width is wrong
- Form.Height is wrong
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Ondrej Pokorny

  • Full Member
  • ***
  • Posts: 220
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #27 on: August 16, 2017, 04:25:08 pm »
I positioned the Form by setting Top and Left to 0. This is what you get:
- From.Left is wrong
- Form.Width is wrong
- Form.Height is wrong
- No
- No
- No

The extra space is the semitransparent shadow area of windows 10 theming. All values are correct.

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #28 on: August 16, 2017, 05:41:45 pm »
Okay. But then Top is wrong as the shadow is also on the top of the window :D
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Ondrej Pokorny

  • Full Member
  • ***
  • Posts: 220
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #29 on: August 16, 2017, 09:58:29 pm »
Okay. But then Top is wrong as the shadow is also on the top of the window :D

Please report to Microsoft  :D

 

TinyPortal © 2005-2018