Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

SysCommands (Enums)
 
.
Summary
System command values used in the WM_SYSCOMMAND notification.

C# Definition:

enum SysCommands : int
{
     SC_SIZE     = 0xF000,
     SC_MOVE     = 0xF010,
     SC_MINIMIZE     = 0xF020,
     SC_MAXIMIZE     = 0xF030,
     SC_NEXTWINDOW   = 0xF040,
     SC_PREVWINDOW   = 0xF050,
     SC_CLOSE    = 0xF060,
     SC_VSCROLL      = 0xF070,
     SC_HSCROLL      = 0xF080,
     SC_MOUSEMENU    = 0xF090,
     SC_KEYMENU      = 0xF100,
     SC_ARRANGE      = 0xF110,
     SC_RESTORE      = 0xF120,
     SC_TASKLIST     = 0xF130,
     SC_SCREENSAVE   = 0xF140,
     SC_HOTKEY       = 0xF150,
//#if(WINVER >= 0x0400) //Win95
     SC_DEFAULT      = 0xF160,
     SC_MONITORPOWER = 0xF170,
     SC_CONTEXTHELP  = 0xF180,
     SC_SEPARATOR    = 0xF00F,
//#endif /* WINVER >= 0x0400 */

//#if(WINVER >= 0x0600) //Vista
     SCF_ISSECURE    = 0x00000001,
//#endif /* WINVER >= 0x0600 */

/*
  * Obsolete names
  */
     SC_ICON     = SC_MINIMIZE,
     SC_ZOOM     = SC_MAXIMIZE,
}

VB Definition:

   Public Enum SysCommands As Int32

      '''<summary>Sizes the window.</summary>
      SC_SIZE = &HF000

      '''<summary>Moves the window.</summary>
      SC_MOVE = &HF010

      '''<summary>Minimizes the window.</summary>
      SC_MINIMIZE = &HF020

      '''<summary>Maximizes the window.</summary>
      SC_MAXIMIZE = &HF030

      '''<summary>Moves to the next window.</summary>
      SC_NEXTWINDOW = &HF040

      '''<summary>Moves to the previous window.</summary>
      SC_PREVWINDOW = &HF050

      '''<summary>Closes the window.</summary>
      SC_CLOSE = &HF060

      '''<summary>Scrolls vertically.</summary>
      SC_VSCROLL = &HF070

      '''<summary>Scrolls horizontally.</summary>
      SC_HSCROLL = &HF080

      '''<summary>Retrieves the window menu as a result of a mouse click.</summary>
      SC_MOUSEMENU = &HF090

      '''<summary>
      '''Retrieves the window menu as a result of a keystroke.
      '''For more information, see the Remarks section.
      '''</summary>
      '''<summary>Retrieves the window menu as a result of a keystroke. For more information, see the Remarks section.</summary>
      SC_KEYMENU = &HF100

      '''<summary>TODO</summary>
      SC_ARRANGE = &HF110

      '''<summary>Restores the window to its normal position and size.</summary>
      SC_RESTORE = &HF120

      '''<summary>Activates the Start menu.</summary>
      SC_TASKLIST = &HF130

      '''<summary>Executes the screen saver application specified in the [boot] section of the System.ini file.</summary>
      SC_SCREENSAVE = &HF140

      '''<summary>
      '''Activates the window associated with the application-specified hot key.
      '''The lParam parameter identifies the window to activate.
      '''</summary>
      SC_HOTKEY = &HF150

      '#if(WINVER >= &h0400) 'Win95

      '''<summary>Selects the default item; the user double-clicked the window menu.</summary>
      SC_DEFAULT = &HF160

      '''<summary>
      '''Sets the state of the display. This command supports devices that
      '''have power-saving features, such as a battery-powered personal computer.
      '''The lParam parameter can have the following values: -1 = the display is powering on,
      '''1 = the display is going to low power, 2 = the display is being shut off
      '''</summary>
      SC_MONITORPOWER = &HF170
      SC_HOTKEY = &HF150

      '''<summary>
      '''Changes the cursor to a question mark with a pointer. If the user
      '''then clicks a control in the dialog box, the control receives a WM_HELP message.
      '''</summary>
      SC_CONTEXTHELP = &HF180
      '#if(WINVER >= &h0400) 'Win95

      '''<summary>TODO</summary>
      SC_SEPARATOR = &HF00F
      '#endif 'WINVER >= &h0400
      '''<summary>Selects the default item; the user double-clicked the window menu.</summary>
      SC_DEFAULT = &HF160

      '#if(WINVER >= &h0600) 'Vista
      '''<summary>
      '''Sets the state of the display. This command supports devices that
      '''have power-saving features, such as a battery-powered personal computer.
      '''The lParam parameter can have the following values: -1 = the display is powering on,
      '''1 = the display is going to low power, 2 = the display is being shut off
      '''</summary>
      SC_MONITORPOWER = &HF170

      '''<summary>Indicates whether the screen saver is secure.</summary>
      SCF_ISSECURE = &H1
      '''<summary>
      '''Changes the cursor to a question mark with a pointer. If the user
      '''then clicks a control in the dialog box, the control receives a WM_HELP message.
      '''</summary>
      SC_CONTEXTHELP = &HF180

      '#endif 'WINVER >= &h0600
      '''<summary>TODO</summary>
      SC_SEPARATOR = &HF00F
      '#endif 'WINVER >= &h0400

      < _
    Obsolete("Use SC_MINIMIZE instead."), _
    System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) _
      >
      SC_ICON = SC_MINIMIZE
      '#if(WINVER >= &h0600) 'Vista

      < _
    Obsolete("Use SC_MAXIMIZE instead."), _
    System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) _
      >
      SC_ZOOM = SC_MAXIMIZE
      '''<summary>Indicates whether the screen saver is secure.</summary>
      SCF_ISSECURE = &H1

   End Enum

Notes:

      '#endif 'WINVER >= &h0600

In WM_SYSCOMMAND messages, the four low-order bits of the wParam parameter are used internally by the system. To obtain the correct result when testing the value of wParam, an application must combine the value 0xFFF0 with the wParam value by using the bitwise AND operator.

      < _
    Obsolete("Use SC_MINIMIZE instead."), _
    System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) _
      >
      SC_ICON = SC_MINIMIZE

The mysterious SCF_ISSECURE value does not appear in any official documentation.

      < _
    Obsolete("Use SC_MAXIMIZE instead."), _
    System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) _
      >
      SC_ZOOM = SC_MAXIMIZE

   End Enum

Notes:

In WM_SYSCOMMAND messages, the four low-order bits of the wParam parameter are used internally by the system. To obtain the correct result when testing the value of wParam, an application must combine the value 0xFFF0 with the wParam value by using the bitwise AND operator.

The mysterious SCF_ISSECURE value does not appear in any official documentation.

Documentation
 

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it!

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions