Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2009.08.02;
Скачать: CL | DM;

Вниз

Multi screen output   Найти похожие ветки 

 
Jon ©   (2008-02-07 17:05) [0]

How can I force a KOL app to show on a second screen?
Is there a feature such as TScreen as on the VCL?


 
lse   (2008-02-14 20:36) [1]

Hi, use winapi to do this. or here"s some code to start:

unit UMultiMon;

interface
uses
     multimon,
     windows;
type
  pmmlist = ^tmmlist;
  tmmlist = record
    mmlast : integer;
    hm : array[0..9] of hmonitor;
    rm : array[0..9] of trect;
  end;

function MMGetMonitorCount : integer;
function MMGetMonitorRect( n : integer ) : TRect;

var
MonitorCount : integer;

implementation
function MakeRect(left, top, width, height : integer ) : trect;
 begin
   Result.Left := left;
   Result.top := top;
   Result.Right := left + width;
   Result.bottom := top + height;
 end;

var
mm : tmmlist;

function EnumMonitorsProc(hm: HMONITOR; dc: HDC; r: PRect; Data: Pointer): Boolean; stdcall;
 var
   m : pmmlist;
 begin
   m := pmmlist( Data );
   inc( m.mmlast );
   m.hm[m.mmlast] := hm;
   m.rm[m.mmlast] := r^;
   Result := True;
 end;

function MMGetMonitorCount : integer;
  begin
    mm.mmlast := -1;
    EnumDisplayMonitors(0, nil, @EnumMonitorsProc, LongInt( @mm ));
    Result := mm.mmlast;
  end;
 
function MMGetMonitorRect( n : integer ) : TRect;
  begin
   Result := MakeRect( 0, 0, 0, 0 );
   if (n > -1)and(n <= mm.mmlast ) then begin
        Result := mm.rm[n];
   end;
  end;
initialization
 begin
  MonitorCount := MMGetMonitorCount;
 end;


Use MMGetMonitorRect to get rect of other monitor and place your windows there.


 
Jon ©   (2008-02-14 20:48) [2]

Ah, the API"s I was searching for, thank you very much indeed!


 
pibraady   (2008-03-02 09:02) [3]

Today was a complete loss, but it"s not important. I"ve just been letting everything wash over me lately. I haven"t gotten much done these days.   Today was a loss, but that"s how it is. I haven"t gotten much done these days, but what can I say? I can"t be bothered with anything recently. I"ve just been letting everything wash over me recently. Oh well. Pfft.   I haven"t gotten anything done these days. I can"t be bothered with anything recently, but what can I say? Today was a total loss. I just don"t have anything to say lately. Eh.   Not much on my mind worth mentioning. I"ve basically been doing nothing. Today was a total loss. Whatever. I"ve just been staying at home doing nothing, but so it goes. Such is life.   Nothing exciting going on to speak of. Today was a complete loss, but shrug. I"ve just been staying at home not getting anything done. I"ve just been letting everything pass me by , but I don"t care. I just don"t have anything to say recently, but that"s how it is. Such is life.  <a href=http://ireehiorendes.wizhoo.com/granny-slut.html> Granny Slut </a>



Страницы: 1 вся ветка

Текущий архив: 2009.08.02;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.012 c
15-1243697653
oldman
2009-05-30 19:34
2009.08.02
Вопрос москвичам (очень надо). А до Алтуфьево метро пустили?


15-1243941074
plastic
2009-06-02 15:11
2009.08.02
Кто ни будь пробовал настраивать D2009 ???


4-1213685860
TUserClass
2008-06-17 10:57
2009.08.02
XPManifest для DLL ...


15-1244061366
Юрий
2009-06-04 00:36
2009.08.02
С днем рождения ! 4 июня 2009 четверг


15-1243316997
Jungle
2009-05-26 09:49
2009.08.02
Программно-аппаратная защита