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

Search Results for "Close" in [All]

Constants

.

        //SetBitmap(hWnd, (isPlaylistVisible ? IDB_RESTORE_PRESSED : IDB_CLOSE_PRESSED));

2: EMR_
.

        EMR_CLOSEFIGURE        = 61,

.

    LINE_CLOSE = 3,

4: LR_
.

    /// in the resource file closest to the desired size. This will succeed only if hImage was loaded by LoadIcon or LoadCursor,

.

    ''' in the resource file closest to the desired size. This will succeed only if hImage was loaded by LoadIcon or LoadCursor,

5: O_
.

const int _O_TEMPORARY   = 0x0040;  /* Temporary file bit - file is deleted when last handle is closed */

.

    public static PropertyKey PKEY_RecordedTV_IsClosedCaptioningAvailable = new PropertyKey( 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 12);

.

    public static PropertyKey PKEY_Search_IsClosedDirectory = new PropertyKey( 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 23);

.

    public static PropertyKey WPD_COMMAND_OBJECT_RESOURCES_CLOSE = new PropertyKey(0xB3A2B22D, 0xA595, 0x4108, 0xBE, 0x0A, 0xFC, 0x3C, 0x96, 0x5F, 0x3D, 0x4A, 7);

.

        static extern bool CloseHandle(IntPtr hHandle);

.

                    CloseHandle(hToken);

.

    public const int SEE_MASK_NOCLOSEPROCESS    = 0x00000040;

.

    public const int SEE_MASK_NOCLOSEPROCESS    = 0x00000040;

.

private const uint FILE_FLAG_DELETE_ON_CLOSE     = 0x04000000;

.

public const int FSCTL_OPBATCH_ACK_CLOSE_PENDING = 0x00090010;

.

public const int FSCTL_WRITE_USN_CLOSE_RECORD = 0x000900ef;

.

        /// The semaphore is set and cannot be closed.

.

        /// The pipe is being closed.

.

        /// The network connection was gracefully closed.

.

        /// The RPC pipe object has already been closed.

.

        public const int RPC_X_PIPE_CLOSED = 1916;

.

        /// Unable to open or close the inject/eject port.

.

        /// A close operation is pending on the session.

.

        public const int ERROR_CTX_CLOSE_PENDING = 7007;

.

        /// The unicodePwd attribute value must be enclosed in double quotes.

.

        /// The Global catalog server is not in the closest site.

.

        public const int ERROR_DS_NOT_CLOSEST = 8588;

.

        /// An existing connection was forcibly closed by the remote host.

.

        public const int ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE = 14045;

.

        /// Manifest Parse Error : The following tags were not closed: %1.

.

        public const int ERROR_SXS_XML_E_UNCLOSEDTAG = 14052;

.

        /// Manifest Parse Error : Element was not closed.

.

        public const int ERROR_SXS_XML_E_UNCLOSEDSTARTTAG = 14060;

.

        public const int ERROR_SXS_XML_E_UNCLOSEDENDTAG = 14061;

.

        /// Manifest Parse Error : A string literal was not closed.

.

        public const int ERROR_SXS_XML_E_UNCLOSEDSTRING = 14062;

.

        /// Manifest Parse Error : A comment was not closed.

.

        public const int ERROR_SXS_XML_E_UNCLOSEDCOMMENT = 14063;

.

        /// Manifest Parse Error : A declaration was not closed.

.

        public const int ERROR_SXS_XML_E_UNCLOSEDDECL = 14064;

.

        /// Manifest Parse Error : A CDATA section was not closed.

.

        public const int ERROR_SXS_XML_E_UNCLOSEDCDATA = 14065;

.

        /// CloseClipboard Failed

.

        public const int CLIPBRD_E_CANT_CLOSE = (int)(0x800401D4 - 0x100000000);

.

        /// XACT_E_TRANSACTIONCLOSED

.

        public const int XACT_E_TRANSACTIONCLOSED = (int)(0x8004D083 - 0x100000000);

.

        /// Unable to close a serialization handle or a file handle.

.

        public const int CO_E_FAILEDTOCLOSEHANDLE = (int)(0x80010138 - 0x100000000);

.

        /// Final closure is pending until additional frees or closes.

.

        public const int CRYPT_E_PENDING_CLOSE = (int)(0x8009200F - 0x100000000);

.

        public const int OSS_CANT_CLOSE_TRACE_FILE = (int)(0x8009302E - 0x100000000);

12: WM
.
WM_CLOSE 0x10 The WM_CLOSE message is sent as a signal that a window or an application should terminate.
.
WM_MDIDESTROY 0x221 An application sends the WM_MDIDESTROY message to a multiple-document interface (MDI) client window to close an MDI child window.
.
WM_SYSCOMMAND 0x112 A window receives this message when the user chooses a command from the Window menu (formerly known as the system or control menu) or when the user chooses the maximize button, minimize button, restore button, or close button.
.

private const UInt32 WM_CLOSE          = 0x0010;

.

   WM_CLOSE = &H10

.

WM_CLOSE          equ 010h

user32

.
Summary
.

static extern bool CloseClipboard();

.

CloseClipboard();

.
Documentation
[CloseClipboard] on MSDN
.
Summary
.

static extern bool CloseDesktop(IntPtr hDesktop);

.

Shared Function CloseDesktop(ByVal hDesktop As IntPtr) As Boolean

.
Documentation
[CloseDesktop] on MSDN
.

static extern bool CloseHandle(IntPtr hHandle);

.

Private Shared Function CloseHandle(ByVal hHandle As IntPtr) As Boolean

.
Documentation
[CloseHandle] on MSDN
.
Summary
The CloseWindow function minimizes (but does not destroy) the specified window.
.

static extern int CloseWindow (IntPtr hWnd);

.

Declare Function CloseWindow  Lib "user32.dll" (TODO) As TODO

.
Documentation
CloseWindow @msdn on MSDN
.
Summary
.

    public static extern bool CloseWindowStation(IntPtr hWinsta);

.
  • [CloseWindowStation] on MSDN
.
Summary
.

    public static extern bool CloseWindowStation(IntPtr hWinsta);

.
  • [CloseWindowStation] on MSDN
.

    // ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.WIN32COM.v10.en/dllproc/base/closedesktop.htm

.

    [DllImport("user32.dll", EntryPoint="CloseDesktop", CharSet =  CharSet.Unicode, SetLastError = true)]

.

    public static extern bool CloseDesktop(IntPtr handle);

.

    ' ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.WIN32COM.v10.en/dllproc/base/closedesktop.htm

.

    <DllImport("user32.dll", EntryPoint:="CloseDesktop", CharSet:=CharSet.Unicode, SetLastError:=True)> _

.

    Public Shared Function CloseDesktop(ByVal handle As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean

.

    protected override bool CloseNativeHandle(IntPtr handle)

.

        return WindowStationAndDesktop.CloseDesktop(handle);

.

                rk.Close();

.

                rk.Close();

.

                rk.Close();

.

    /// Close the native handle. The real call is dependent on whether it is

.

    /// <param name="handle">Handle to be closed.</param>

.

    protected abstract bool CloseNativeHandle(IntPtr handle);

.

        bool closed = CloseNativeHandle(this.handle);

.

        if (closed)

.

        return closed;

.

    protected override bool CloseNativeHandle(IntPtr handle)

.

        return WindowStationAndDesktop.CloseWindowStation(handle);

.

        internal const UInt32 SC_CLOSE    =0xF060;

.

SC_CLOSE = &HF060

.

hWnd is the pointer to the window you want to close/destroy. Create a new IntPtr object with the window's handle as a parameter to it's constructor. Make sure the pointers are in decimal, not in hex as spy++ gives them to you.

.

//Closes the form

.

btnCloseWindow_Click(object sender, EventArgs e)

.

[System.Windows.Forms.Form.Close]

.

        /// Close button

.

        DFCS_CAPTIONCLOSE = 0,

.

The buttons are drawn by vectors so to draw a "menu" close icon simply draw a DFCS_CAPTIONCLOSE button with the size of SM_CXMENUCHECK/SM_CYMENUCHECK.

.

    public static void RemoveCloseButton(Form frm)

.

CloseClipboard();

.

    Private Const SC_CLOSE As Integer = &HF060

.

    EnableMenuItem(GetSystemMenu(Me.Handle, False), SC_CLOSE, MF_GRAYED)

.
Summary
EndTask - force a window to close
.

     static extern bool CloseClipboard();

.

         CloseClipboard();

.

    private const UInt32 WM_CLOSE = 0x0010;

.

            // Try closing application by sending WM_CLOSE to all child windows in all threads.

.

            // Try to close main window.

.

            if(proc.CloseMainWindow())

.

                proc.Close();

.

        // Close the enumerated window.

.

        PostMessage(hWnd, WM_CLOSE, IntPtr.Zero, IntPtr.Zero);

.

   Private Const WM_CLOSE As UInt32 = &H10

.

       ' Try closing application by sending WM_CLOSE to all child windows in all threads.

.

       ' Try to close main window.

.

       If proc.CloseMainWindow() Then

.

     proc.Close()

.

     ' Close the enumerated window.

.

     PostMessage(hWnd, WM_CLOSE, IntPtr.Zero, IntPtr.Zero)

.

Here is an alternative Managed API to FindWindow, The article also describes a way to CloseWindow of another process like notepad, not sure if there is such thing in Win32 API, but at least you can do it in .NET! Here is the article:

.

     CloseClipboard();

.

     static extern bool CloseClipboard();

.

         CloseClipboard();

.

    public static void RemoveCloseButton(Form frm)

.

        return SafeNativeMethods.CloseWindowStation(handle);

.

Quote from MSDN: "The CloseWindowStation function closes an open window station handle. Do not specify the handle returned by the GetProcessWindowStation function."

.

    public static void RemoveCloseButton(Form frm)

.

    private const Int32 SC_CLOSE = 0xF060;

.

    public static void RemoveConsoleCloseButton()

.

        DeleteMenu(hMenu, SC_CLOSE, MF_GRAYED);

.

    Private Sub Form_Closed(ByVal sender As System.Object, ByVal e As FormClosedEventArgs) Handles MyBase.FormClosed

.

    Private Sub Form_Closed(ByVal sender As System.Object, ByVal e As FormClosedEventArgs) Handles MyBase.FormClosed

.

       uint close= GetMenuItemID(hmenusys , 6);

.

       ModifyMenu(hmenusys, close, 0X0, (IntPtr) min, "Close");

.

       ModifyMenu(hmenusys, max, 0X0, (IntPtr)close, "Maximize");

.

You can close this page. this is not function.

.

CloseClipboard();

.

        return SafeNativeMethods.CloseWindowStation(handle);

.

See [Enums.ACCESS_MASK] and [CloseWindowStation].

.

    public static void RemoveCloseButton(Form frm)

.

              //Removes the actual Close button

.

              //Removes the seperator between the Close button and the Maximize button

.

    private static extern int CloseHandle(

.

            // Close the process handle

.

            StatusBar.CloseHandle(hProcess);

.

    'In this example, we've opened a Notepad instance, entered some text, and clicked the 'X' to close Notepad.

.

Here is an alternative Managed API to FindWindow, The article also describes a way to CloseWindow of another process like notepad, not sure if there is such thing in Win32 API, but at least you can do it in .NET! Here is the article:

.

            Me.Close()

winscard

.
Summary
The SCardReleaseContext function closes an established resource manager context, freeing any resources allocated under that context, including SCARDHANDLE objects and memory allocated using the SCARD_AUTOALLOCATE length designator.

kernel32

.

[System.String.Intern] is the closest thing, although an atom is different from a string.

.
Summary
.

static extern bool CloseHandle(IntPtr hObject);

.

Public Shared Function CloseHandle(ByVal hObject As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean

.

Declare Auto Function CloseHandle Lib "kernel32.dll" (ByVal hObject As IntPtr) As Boolean

.

Declare Function CloseHandle Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Integer) As Integer

.

static def CloseHandle(hObject as IntPtr) as bool:

.

For .NET 2.0, consider using Microsoft.Win32.SafeHandles.SafeFileHandle instead. It can be used where IntPtr is used. If you use a SafeFileHandle, do not call CloseHandle as the CLR will close it for you (even if it's already closed).

.

      static extern unsafe bool CloseHandle(

.

CloseHandle(hMapFile)

.
Documentation
[CloseHandle] on MSDN
.

    // so we want to use LayoutKind.Explicit to mimic it as closely

.

        CTRL_CLOSE_EVENT,

.

- Save the current buffer information so you can restore it when close it your buffer

.

  are.Close();

.

CloseHandle(myEventHandle);

.

NOTE: This class needs some changes. The CloseHandle call will destroy the event when the last handle is closed. This makes it hard for one application to "lock" the event while making another wait on it since this class is always closing the handle. An alternative that I found to work is to have the CreateEvent call in the constructor and implement IDisposable by moving the CloseHandle call to the Dispose method.

.

    static extern bool CloseHandle(IntPtr hObject);

.

        CloseHandle( _Handle );

.

        CloseHandle( _Handle );

.

        CloseHandle( _Handle );

.

        CloseHandle( _Handle );

.

        Win32API.CloseHandle(_hMMF);

.

        _fs.Close();

.

    internal static extern bool CloseHandle(IntPtr hFile);

.

        Win32API.CloseHandle(_hMMF);

.

        _fs.Close();

.

    internal static extern bool CloseHandle(IntPtr hFile);

.

            mutex.Close();

.

    ///         then call Close();

.

    private static extern bool CloseHandle(IntPtr handle);

.

        throw new ObjectDisposedException("NamedPipeStream", "The stream has already been closed");

.

        throw new ObjectDisposedException("NamedPipeStream", "The stream has already been closed");

.

    public override void Close()

.

        CloseHandle(_handle);

.

        throw new ObjectDisposedException("NamedPipeStream", "The stream has already been closed");

.

        sw.Close();

.

    private static extern bool CloseHandle([In] IntPtr hObject);

.

        CloseHandle(handleToSnapshot);

.

     FsctlOpBatchAckClosePending = (EFileDevice.FileSystem << 16) | (4 << 2) | EMethod.Buffered | (0 << 14),

.

     FsctlWriteUsnCloseRecord = (EFileDevice.FileSystem << 16) | (59 << 2) | EMethod.Neither | (0 << 14),

.

   Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer

.

       CloseHandle(hdrive)

.

    DUPLICATE_CLOSE_SOURCE = (0x00000001),// Closes the source handle. This occurs regardless of any error status returned.

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: