I think the message is sent only when the resolution changes, not the 
size of the window.


On 15/08/2011 3:05 p.m., Laurence Bevan wrote:
> 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
> ...
> 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
Unsubscribe: send an email to with Subject: 

Reply via email to