Thread View: borland.public.cppbuilder.nativeapi
4 messages
4 total messages
Started by JD
Wed, 30 May 2007 10:22
Detect Screen DPI Change
Author: JD
Date: Wed, 30 May 2007 10:22
Date: Wed, 30 May 2007 10:22
6 lines
914 bytes
914 bytes
Is there some way that I can detect a change in the screens density of pixels per inch (like when the user changes the resolution using the ControlPanel)? ~ JD
Re: Detect Screen DPI Change
Author: Giuliano
Date: Wed, 30 May 2007 10:38
Date: Wed, 30 May 2007 10:38
22 lines
1386 bytes
1386 bytes
Il 30 May 2007 03:22:58 -0700, "JD" <nospam@nospam.com> ha scritto: > >Is there some way that I can detect a change in the screens >density of pixels per inch (like when the user changes the >resolution using the ControlPanel)? > >~ JD You could try to see if TApplicationEvents::OnSettingChange of the TApplicationEvents component resolves your problem. In fact, the online help states: <<Use OnSettingChange to respond when Windows informs the application that a system-wide setting or policy has changed.>> So, I think it could help you. Regards Giuliano
Re: Detect Screen DPI Change
Author: Mike Collins
Date: Wed, 30 May 2007 11:42
Date: Wed, 30 May 2007 11:42
24 lines
1474 bytes
1474 bytes
System sends a WM_DISPLAYCHANGE message to all windows when the display changes. see: http://msdn2.microsoft.com/en-us/library/ms534847.aspx Just intercept this message by defining your own wndproc for the main form and looking for this message. Then you should be able to be informed when the screen settings change HTH Mike "JD" <nospam@nospam.com> wrote in message news:465d5082$1@newsgroups.borland.com... > > Is there some way that I can detect a change in the screens > density of pixels per inch (like when the user changes the > resolution using the ControlPanel)? > > ~ JD >
Re: Detect Screen DPI Change
Author: JD
Date: Thu, 31 May 2007 12:35
Date: Thu, 31 May 2007 12:35
11 lines
1257 bytes
1257 bytes
"Mike Collins" <its@TheBottomOfThePost> wrote: > > System sends a WM_DISPLAYCHANGE message to all windows when > the display changes. That's the way I went because only a secondary form is interested and I wanted to keep the code encapsulated. Using a TApplication event would break the encapsulation. ~ JD
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads