PortableApps.com Platform and Suite 1.6 have been released.

Multi Monitor Display problem

Submitted by mar_kus on May 13, 2009 - 6:41am

Hi,

in reply to this topic (replying isn't possible any more, i think because the post is too old) ... :
http://portableapps.com/node/4682

I have two monitors, and my taskbar is on the secondary monitor. clicking on portable apps taskbar icon, portable apps shows up on the primary monitor.

Delphi fully supports dual monitor setups so it should be no problem to fix this!

Example:

{get index of monitor with taskbar on it}
function GetMonitorWithTaskBarIndex: Integer;
var
I: Integer;
WorkArea: TRect;
AllMonitor: TRect;
begin
Result := 0;
for I := 0 to Screen.MonitorCount - 1 do
begin
WorkArea := Screen.Monitors[I].WorkareaRect;
AllMonitor := Screen.Monitors[I].BoundsRect;
if ((WorkArea.Right - WorkArea.Left) < (AllMonitor.Right - AllMonitor.Left))
or ((WorkArea.Bottom - WorkArea.Top) < (AllMonitor.Bottom - AllMonitor.Top)) then
begin
Result := I;
break;
end;
end;
end;