opensubscriber
   Find in this group all groups
 
Unknown more information…

d : delphi@delphi.org.nz 15 August 2011 • 11:05AM -0400

[DUG] Detecting change in screen size
by Laurence Bevan

REPLY TO AUTHOR
 
REPLY TO GROUP




Hi,

I'm trying to detect a change in the client screen size on a Windows tablet.
The tablet comes bundled with a toolbar application which displays along the
left side of the screen which the user can hide or display by clicking in
the taskbar area (not a particularly useful tool but users love it!!). This
cuts down the width of the screen area by about 30 pixels depending on the
resolution. I want my application to grow (or shrink) in size when they
hide/display the toolbar.

I'm using the following  code below in D7:

private
    procedure WMDisplayChange(var Message:TMessage) ; message
WM_DISPLAYCHANGE;
...

procedure TMainForm.WMDisplayChange(var Message: TMessage) ;
begin
    ShowMessage('Change in display size detected!') ;
    inherited;
end;

however nothing fires when the screen area changes. My application has no
title bar or borders which I'm wondering if this is causing the problem. Any
ideas??

I could use a timer to monitor the screen work area every second or
something but I would rather get the OS to notify my app if possible.

Regards,
Laurence Bevan




_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delp...
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-request@delp... with Subject: unsubscribe

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.