Forum > Linux

Ubuntu 22.04.1 LTS, Lazarus 2.2.0 The GetMonitorInfo function returns a strange

(1/1)

dmitryb:
Ubuntu 22.04.1 LTS,
Lazarus 2.2.0+dfsg1-5ubuntu1 (rev Debian package 2.2.0+dfsg1-5ubuntu1) FPC 3.2.2 x86_64-linux-gtk2
The GetMonitorInfo function returns a strange result.



--- 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";}};} ---WorkArea.Left = 74 : WorkArea.Top = 1894866587 : WorkArea.Right = 1600 : WorkArea.Bottom = 1894867579 


--- 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 TForm1.Button4Click(Sender: TObject);var  MasterAbsRect: TRect;  MonInfo: TMonitorInfo;  Result: Boolean;  WorkArea: TRect;begin  MasterAbsRect := Rect(Left, Top, Left + Width, Top + Height);  MonInfo.cbSize := SizeOf(TMonitorInfo);  Result := GetMonitorInfo(MonitorFromRect(@MasterAbsRect, MONITOR_DEFAULTTONEAREST), @MonInfo);  if (Result) then  begin    WorkArea := MonInfo.rcWork;    Edit1.Text := 'WorkArea.Left = ' + WorkArea.Left.ToString +                  ' : WorkArea.Top = ' + WorkArea.Top.ToString +                  ' : WorkArea.Right = ' + WorkArea.Right.ToString +                  ' : WorkArea.Bottom = ' + WorkArea.Bottom.ToString;   end;end; 

Navigation

[0] Message Index

Go to full version