0

Is it possible to have the same effect of windows option "show window contents while dragging" turned on/off for a single application and if possible, how can it be done in Delphi?

Platform : Delphi 2009

TLama
  • 75,147
  • 17
  • 214
  • 392
fr21
  • 1,746
  • 7
  • 26
  • 45
  • Handle WM_MOVING and ... – OnTheFly Feb 28 '12 at 09:26
  • 2
    Are you asking about whether there's a system support for the option being turned on only for a specific application (set of applications?) and whether you can specify the application(s) using Delphi? Or is it more like whether your own application can always behave as if *Show window contents while dragging* was on regardless of the option's actual state? – Andriy M Feb 28 '12 at 09:54
  • I would like to have my application to behave as if Show window contents while dragging was OFF regardless of the option's actual state. – fr21 Feb 28 '12 at 10:03
  • I can use SystemParametersInfo(SPI_SETDRAGFULLWINDOWS, 0, nil, 0) and toggle true/false in OnActivate/OnDeactivate events, but it doesnot work for the cases like user changing the option's actual state when the application is running. And also it looks like a workaround and not the actual solution. – fr21 Feb 28 '12 at 10:11
  • This behaviour is needed as there are lot of resizable controls on the forms and to reduce flicker(when resizing). – fr21 Feb 28 '12 at 10:20
  • 1
    @Pavan It's easier and better just to get rid of the flicker. Like this: http://stackoverflow.com/questions/8058745/tlabel-and-tgroupbox-captions-flicker-on-resize#answer-8060672 – David Heffernan Feb 28 '12 at 10:24
  • @DavidHeffernan : tried using WS_EX_COMPOSITED. Unfortunately, it did not help much. Flicker is gone, but the painting speed reduced drastically. – fr21 Feb 28 '12 at 15:46
  • @Pavan I only use it on a select class of control types, and only whilst resizing (I explain how to do that at the link I gave). I know that drawing speed is significantly slower on XP when you make all windows composited but in my experience it is acceptable if you are selective over the application of the style. – David Heffernan Feb 28 '12 at 15:55

1 Answers1

0

Work around :

http://objectmix.com/delphi/402112-form-frame-during-resize.html

fr21
  • 1,746
  • 7
  • 26
  • 45