Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "KOL";
Текущий архив: 2009.08.02;
Скачать: [xml.tar.bz2];

Вниз

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 вся ветка

Форум: "KOL";
Текущий архив: 2009.08.02;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.005 c
15-1243777090
@!!ex
2009-05-31 17:38
2009.08.02
Как в Delphi отключить монтирование окон друг к другу?


15-1243701266
pushkin42
2009-05-30 20:34
2009.08.02
IBX SQL протокол


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


2-1244397306
MADMAN
2009-06-07 21:55
2009.08.02
Помогите с SQL запросом


15-1243231535
Юрий Зотов
2009-05-25 10:05
2009.08.02
Группировка в XSL





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский