Re: [Lazarus] Detecting desktop area size

2011-04-01 Thread Hans-Peter Diettrich
Kjow schrieb: Maybe a little OT, but is it possible to change screen resolution (e.g. on a native 19200x1200 set 800x600) in a crossplatform way? I need this for fullscreen apps (opengl in first). Are you sure that you want to use an digital monitor (TFT...) in anything but its native

Re: [Lazarus] Detecting desktop area size

2011-04-01 Thread Hans-Peter Diettrich
Paul Ishenin schrieb: How do I know on which monitor my form is? (I only have one monitor, so I cannot test this) Looks like search does not work on your PC anymore. Look at TForm.Monitor property. A form/window actually can span multiple monitors. DoDi --

Re: [Lazarus] Detecting desktop area size

2011-04-01 Thread Kjow
2011/4/1 Hans-Peter Diettrich drdiettri...@aol.com: Are you sure that you want to use an digital monitor (TFT...) in anything but its native resolution? CRTs can be configured to a wide range of resolutions, but nowadays flatscreens, with addressable pixels, require soft-/hardware

Re: [Lazarus] Detecting desktop area size

2011-04-01 Thread Paul Ishenin
01.04.2011 19:32, Hans-Peter Diettrich wrote: Paul Ishenin schrieb: How do I know on which monitor my form is? (I only have one monitor, so I cannot test this) Looks like search does not work on your PC anymore. Look at TForm.Monitor property. A form/window actually can span multiple

Re: [Lazarus] Detecting desktop area size

2011-03-31 Thread zeljko
On Thursday 31 of March 2011 01:06:48 Bart wrote: Hi, Is there any (more or less) reliable way to detect the size of the desktop (that is: on the active screen, the space a form can occupy so that it will take in account the presence of a taskbar etc.) I need something like this to keep a

Re: [Lazarus] Detecting desktop area size

2011-03-31 Thread Paul Ishenin
31.03.2011 7:06, Bart пишет: Is there any (more or less) reliable way to detect the size of the desktop (that is: on the active screen, the space a form can occupy so that it will take in account the presence of a taskbar etc.) .. I know how to do it on Windows. Linux (GTK2) and MAC would be

Re: [Lazarus] Detecting desktop area size

2011-03-31 Thread Bart
On 3/31/11, zeljko zel...@holobit.net wrote: GetMonitorInfo(), GetSystemMetrics() SM_CXSCREEN, SM_CYSCREEN,SM_CXVIRTUALSCREEN,SM_CYVIRTUALSCREEN doesn't help ? On Windows GetSystemMetrics does return the size the (virtual) desktop has, but it does not subtract the space occupied by the Windows

Re: [Lazarus] Detecting desktop area size

2011-03-31 Thread Bart
On 3/31/11, Paul Ishenin i...@kmiac.ru wrote: TScreen.Monitors[i].WorkareaRect I'll take a look. Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] Detecting desktop area size

2011-03-31 Thread Bart
On 3/31/11, Paul Ishenin i...@kmiac.ru wrote: TScreen.Monitors[i].WorkareaRect This seems to work for Win and Linux/GTK2. This raises yet another question though. How do I know on which monitor my form is? (I only have one monitor, so I cannot test this) Bart --

Re: [Lazarus] Detecting desktop area size

2011-03-31 Thread Sven Barth
Am 31.03.2011 16:15, schrieb Bart: On 3/31/11, Paul Ishenini...@kmiac.ru wrote: TScreen.Monitors[i].WorkareaRect This seems to work for Win and Linux/GTK2. This raises yet another question though. How do I know on which monitor my form is? (I only have one monitor, so I cannot test this)

Re: [Lazarus] Detecting desktop area size

2011-03-31 Thread Martin
On 31/03/2011 15:35, Sven Barth wrote: Am 31.03.2011 16:15, schrieb Bart: On 3/31/11, Paul Ishenini...@kmiac.ru wrote: TScreen.Monitors[i].WorkareaRect This seems to work for Win and Linux/GTK2. This raises yet another question though. How do I know on which monitor my form is? (I only

Re: [Lazarus] Detecting desktop area size

2011-03-31 Thread Kjow
2011/3/31 Sven Barth pascaldra...@googlemail.com: What about this: Screen.MonitorFromWindow(YourForm.Handle); It returns a TMonitor. Regards, Sven Maybe a little OT, but is it possible to change screen resolution (e.g. on a native 19200x1200 set 800x600) in a crossplatform way? I need

Re: [Lazarus] Detecting desktop area size

2011-03-31 Thread Bart
On 3/31/11, Sven Barth pascaldra...@googlemail.com wrote: What about this: Screen.MonitorFromWindow(YourForm.Handle); It returns a TMonitor. Thanks. Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] Detecting desktop area size

2011-03-31 Thread Reimar Grabowski
On Thu, 31 Mar 2011 17:32:10 +0200 Sven Barth pascaldra...@googlemail.com wrote: I'm not really confident in this, but I believe if you tell OpenGL to be fullscreen in that or that resolution it will switch to that automatically. No, it does not, because you don't give such information to

Re: [Lazarus] Detecting desktop area size

2011-03-31 Thread Paul Ishenin
31.03.2011 22:15, Bart wrote: On 3/31/11, Paul Ishenini...@kmiac.ru wrote: TScreen.Monitors[i].WorkareaRect This seems to work for Win and Linux/GTK2. This was tested on OSX during the development too. This raises yet another question though. How do I know on which monitor my form is? (I

Re: [Lazarus] Detecting desktop area size

2011-03-31 Thread Bart
On 4/1/11, Paul Ishenin webpi...@mail.ru wrote: This was tested on OSX during the development too. Nice. Looks like search does not work on your PC anymore. (Well, it is slow on my 10 year old machine, but is still works most of the time. I also searched the forum and wiki.) Look at

[Lazarus] Detecting desktop area size

2011-03-30 Thread Bart
Hi, Is there any (more or less) reliable way to detect the size of the desktop (that is: on the active screen, the space a form can occupy so that it will take in account the presence of a taskbar etc.) I need something like this to keep a form that I create at runtime in view on the desktop