mikebinz
mikebinz

Reputation: 406

Is It Possible To Change a Window's Size in The Background

Related to, but a more general question than How to Maximize a Window in background?

It is possible to Minimize, Restore, Move and Resize, and/or Maximize an Application Window using the ShowWindow() and SetWindowPos() API's

Using these has the disadvantage of changing the Active Window and Z-Order

Is it possible to make these changes in The Background, so that the changes only become noticable the next time it is Activated?

A soultion using using API's or VB6 is preferred

"Rest assured that things will get worse, before they get a lot worse" - Anon.

Upvotes: 0

Views: 114

Answers (1)

Jonathan Potter
Jonathan Potter

Reputation: 37192

SetWindowPos doesn't have to change the z-order or activate the window.

  • Use the SWP_NOZORDER flag to prevent the z-order from changing.
  • Use the SWP_NOOWNERZORDER flag to prevent the window's owner's z-order from changing (if the window is owned)
  • Use the SWP_NOACTIVATE flag to prevent the window from being activated.

These flags (and their values) are documented here.

Upvotes: 3

Related Questions