» Home

  » Plugins

      » Mime

            » Supported Directives

Brass Plugins: Mime

 

Supported Directives: Api - Set Window Visibility

This directive manipulates the appearance and visibility of a window. It can manipulate top level windows and child windows.

The format of the directive is:

[ShowWindow(state)]

 

The state parameter may be one of the following options:

  • minimize - minimizes the window to the task bar (or within an MDI app)
  • maximize - maximizes the window
  • restore - emulates the "restore" option when right clicking a window titlebar
  • show - makes the window visible
  • hide - makes the window invisible

 

If you need to manipulate a window belonging to another application, you must first change the target window using the SetTargetWnd() directive.

 

Example

Maximize a window:

[ShowWindow(maximize)]

 

Minimize a window:

[ShowWindow(minimize)]

 

Hide a window:

[ShowWindow(hide)]

 

Show a window:

[ShowWindow(show)]

 

 

Technical Notes

Be aware that this directive can override an application's normal behaviour.

The show and hide parameters may initially seem a little strange. They are intended to be used with the SetTargetWnd directive. This allows a directive to show and hide windows other than the one a gesture was made in. An example of this could be a file management system. Two Explorer windows may be needed for easy drag-and-drop copying between multiple local folders and one single "backup drive" remote folder. Using SetTargetWnd with ShowWindow, the remote "backup drive" Explorer window can be shown or hidden with a single gesture as needed.

Be aware that if you make a gesture in a window then use ShowWindow to hide that same window, you might have trouble getting it visible again.