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 "WM" in [All]

winspool

.

    Public wMonth As Short

.

    Public wMinute As Short

.

    Public wMilliseconds As Short

.

    pinvokeResult = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, IntPtr.Zero,

.

        pinvokeResult = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, IntPtr.Zero,

.

Turns out that there are some clever and powerful tools in Visual Studio 2005 and 2008 for working with the Management Classes (although couldn’t find it in the “Standard Edition” installed on this machine, definitely exists in my laptop’s Visual Studio). You can use Server Explorer to navigate a treeview to your management class (in this example, the Printers node), right-click on it and select “Generate Managed Class”. This will automagically create a strongly-typed C#.Net class representing the object model of the WMI Printers Class, with all its properties and methods.

twain_32

.

static extern TwRC DSMparent( [In, Out] TwIdentity origin, IntPtr zeroptr, TwDG dg, TwDAT dat, TwMSG msg, ref IntPtr refptr );

avifil32

.

    Public dwMaxBytesPerSecond As Int32

misc

.

Is someone going to add the module for dwmapi.dll?

Interfaces

.

    ,BINDSTATUS_RAWMIMETYPE

.

        int GetBandInfo([In] Int32 dwBandID, [In] Int32 dwViewMode, [In, Out] ref DESKBANDINFO pdbi);

.

    Sub GetBandInfo(dwBandID As UInt32, dwViewMode As UInt32, ByRef pdbi As DESKBANDINFO)

.

    Public Overridable Sub GetBandInfo(dwBandID As UInt32, dwViewMode As UInt32, ByRef dbi As DESKBANDINFO) Implements IDeskBand.GetBandInfo, IDeskBand2.GetBandInfo

.

    dbi.dwModeFlags = DBIM.TITLE Or DBIM.ACTUAL Or DBIM.MAXSIZE Or DBIM.MINSIZE Or DBIM.INTEGRAL

.

        'WM_KEYDOWN

.

    Public dwMask As UInt32

.

    Public dwModeFlags As DBIM

.

    Sub GetBandInfo(dwBandID As UInt32, dwViewMode As UInt32, ByRef pdbi As DESKBANDINFO)

.

    Sub GetBandInfo(dwBandID As UInt32, dwViewMode As UInt32, ByRef pdbi As DESKBANDINFO)

.

        int GetBandInfo([In] Int32 dwBandID, [In] Int32 dwViewMode, [In, Out] ref DESKBANDINFO pdbi);

.

    Sub GetBandInfo(dwBandID As UInt32, dwViewMode As UInt32, ByRef pdbi As DESKBANDINFO)

.

    Public Overridable Sub GetBandInfo(dwBandID As UInt32, dwViewMode As UInt32, ByRef dbi As DESKBANDINFO) Implements IDeskBand.GetBandInfo, IDeskBand2.GetBandInfo

.

    dbi.dwModeFlags = DBIM.TITLE Or DBIM.ACTUAL Or DBIM.MAXSIZE Or DBIM.MINSIZE Or DBIM.INTEGRAL

.

        'WM_KEYDOWN

.

    Public dwMask As UInt32

.

    Public dwModeFlags As DBIM

.

    Sub GetBandInfo(dwBandID As UInt32, dwViewMode As UInt32, ByRef pdbi As DESKBANDINFO)

.

    Sub GetBandInfo(dwBandID As UInt32, dwViewMode As UInt32, ByRef pdbi As DESKBANDINFO)

.

     uint ShowMessage(IntPtr hwnd,

.

    Function ShowMessage(ByVal hwnd As IntPtr, <MarshalAs(UnmanagedType.LPWStr)> ByVal lpstrText As String, <MarshalAs(UnmanagedType.LPWStr)> ByVal lpstrCaption As String, ByVal dwType As Integer, <MarshalAs(UnmanagedType.LPWStr)> ByVal lpstrHelpFile As String, ByVal dwHelpContext As Integer, ByRef lpResult As Integer) As Integer

.

The original definition on this page marshalled the strings as UnmanagedType.BStr which I think was incorrect since the underlying type is LPOLESTR. I experienced heap corruption and instability. ShowMessage also did not appear to be called reliably.

.

            ChkResult(ExecuteCommand(FormControlCommandIds.CommandIds.ShowMergeFormDialog));

.

        string pszFileName, uint dwMode);

.

            ByVal dwMode As STGM) As HRESULT

.

        [In] FolderFlags dwMask,

.

        [In] FolderViewMode fvMode,

.

    FORCEVIEWMODE = 0x2,

.

    /// Enumerates the different viewmodes of the explorer listview.

.

    public enum FolderViewMode : int

.

        [In] FolderFlags dwMask,

.

        [In] FolderViewMode fvMode,

coredll

.

    Dim wMonth As Short

.

    Dim wMinute As Short

.

    Dim wMilliseconds As Short

.

        .wMilliseconds = NewDate.Millisecond

.

        .wMinute = NewDate.Minute

.

        .wMonth = NewDate.Month

.

        int dwMessageId, int dwLanguageId, System.Text.StringBuilder lpBuffer, int nSize, IntPtr[] Arguments);

.

        int dwMessageId, int dwLanguageId, System.Text.StringBuilder lpBuffer, int nSize, IntPtr[] Arguments);

.

    Public dwMemoryLoad As Int32

.

    public int dwMemoryLoad { get; set; }

.
Summary
The keybd_event function synthesizes a keystroke. The system can use such a synthesized keystroke to generate a WM_KEYUP or WM_KEYDOWN message. The keyboard driver's interrupt handler calls the keybd_event function (from msdn.microsoft.com)
.

//This sample code is mainly used to turn the backlight on a WM device. The keystrokes can changed to use for other functions

.

public static extern uint lineOpen(IntPtr m_hLineApp, int dwDeviceID, out IntPtr lphLine, int dwAPIVersion, int dwExtVersion, IntPtr dwCallbackInstance, int dwPrivileges, int dwMediaModes, IntPtr lpCallParams);

.

    uint WM_COMMAND = 0x0111;

.

    uint WM_LBUTTONDOWN = 0x0201;

.

    uint WM_USER = 0x0400;

.

    uint WM_NOTIFY_TRAY = WM_USER + 2001;

.

                case WM_NOTIFY_TRAY:

.

                    if((uint) m.LParam == WM_LBUTTONDOWN && (uint) m.WParam == 5000)

.

            notdata.CallbackMessage = WM_NOTIFY_TRAY;

.

    User32.SendMessage(listView1.Handle, User32.WM.WM_KEYDOWN, (int)User32.VK.VK_DOWN, 0);

.

    User32.SendMessage(listView1.Handle, User32.WM.WM_KEYUP, (int)User32.VK.VK_DOWN, 0);

.

    User32.SendMessage(listView1.Handle, User32.WM.WM_KEYDOWN, (int)User32.VK.VK_UP, 0);

.

    User32.SendMessage(listView1.Handle, User32.WM.WM_KEYUP, (int)User32.VK.VK_UP, 0);

.

    public static extern int SendMessage(IntPtr hWnd, WM Msg, int wParam, int lParam);

.

    User32.SendMessage(listView1.Handle, User32.WM.WM_KEYDOWN, (int)User32.VK.VK_UP, 0);

.

    User32.SendMessage(listView1.Handle, User32.WM.WM_KEYUP, (int)User32.VK.VK_UP, 0);

.

    public enum WM

.

    WM_KEYUP = 0x0101,

.

    WM_KEYDOWN = 0x0100

.

    public static extern int SendMessage(IntPtr hWnd, WM Msg, int wParam, int lParam);

.

    public enum WM

.

    WM_KEYUP = 0x0101,

.

    WM_KEYDOWN = 0x0100

.

    static extern int SendMessage(IntPtr hWnd, int wMsg, int wParam, int lParam);

.

        /// <summary>Prevents generation of the WM_SYNCPAINT message.</summary>

.

        /// <summary>Applies new frame styles set using the SetWindowLong function. Sends a WM_NCCALCSIZE message to

.

        /// the window, even if the window's size is not being changed. If this flag is not specified, WM_NCCALCSIZE

.

        /// <summary>Prevents the window from receiving the WM_WINDOWPOSCHANGING message.</summary>

.

private const int WM_HOTKEY = 0x312;

.

static extern int WaitForMultipleObjects(UInt32 nCount, IntPtr[] lpHandles, Boolean fWaitAll, UInt32 dwMilliseconds);

.

Declare Function WaitForMultipleObjects Lib "coredll.dll" (ByVal nCount As Integer, ByVal lpHandles() As IntPtr, ByVal fWaitAll As Boolean, ByVal dwMilliseconds As Integer) As Integer

.

dwMilliseconds: Specifies the time-out interval in milliseconds. The function returns if the interval elapses, even if the conditions specified by the bWaitAll parameter are not met. If dwMilliseconds is zero, the function tests the states of the specified objects and returns immediately. If dwMilliseconds is INFINITE, the function's time-out interval never elapses.

.

    public ushort wMid;

shlwapi

.

                            DontShowMeThisDialogAgain

winhttp

.

            uint dwModifiers

.

Declare Function WinHttpAddRequestHeaders Lib "winhttp.dll" (ByVal hRequest As IntPtr, ByVal pwszHeaders As String, ByVal dwHeaderLength As Integer, ByVal dwModifiers As Integer) As Boolean

crypt32

.

    public static extern IntPtr CertCreateCTLContext(uint dwMsgAndCertEncodingType, IntPtr pbCtlEncoded, uint cbCtlEncoded);

.

These constants are used for the dwMsgAndCertEncodingType.

.

            uint dwMsgEncodingType,

.

            uint dwMsgType,

.

static extern IntPtr CryptMsgOpenToEncode(int dwMsgEncodingType, uint dwFlags, int dwMsgType, IntPtr pvMsgEncodeInfo, IntPtr pszInnerContentObjID, IntPtr pStreamInfo);

.

        IntPtr pdwMsgAndCertEncodingType,

.

    verifyParams.dwMsgAndCertEncodingType = CryptoConstants.X509_ASN_ENCODING | CryptoConstants.PKCS_7_ASN_ENCODING;

.

     cpMessageParams.dwMsgEncodingType = X509_ASN_ENCODING | PKCS_7_ASN_ENCODING;

.

        public uint dwMsgAndCertEncodingType;

gdiplus

.

    /// Use the EmfToWmfBits function in the GDI+ specification to convert a

.

static extern IntPtr GdipEmfToWmfBits(HandleRef hEmf, uint uBufferSize,

.

    byte[] bBuffer, int iMappingMode, EmfToWmfBitsFlags flags);

.

private declare function GdipEmfToWmfBits lib "gdiplus.dll"(ByVal hEmf as IntPtr, _

.

    ByVal flags as EmfToWmfBitsFlags) as UInteger

.
Documentation
[GdipEmfToWmfBits] on MSDN

oleacc

.

uint nMsg = RegisterWindowMessage("WM_HTML_GETOBJECT");

faultrep

.

  __in  DWORD dwMode

user32

.

An application sends the WM_MDIICONARRANGE message to the multiple-document interface (MDI) client window to prompt the client window to arrange its minimized MDI child windows.

.

static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode, WM wParam, [In]KBDLLHOOKSTRUCT lParam);

.

static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode, WM wParam, [In]MSLLHOOKSTRUCT lParam);

.

static extern TODO ChangeWindowMessageFilter(USER32)(TODO);

.

Declare Function ChangeWindowMessageFilter(USER32) Lib "user32.dll" (TODO) As TODO

.
Documentation
ChangeWindowMessageFilter(USER32)@msdn on MSDN
.

public static extern bool ChangeWindowMessageFilterEx(IntPtr hWnd, uint msg, ChangeWindowMessageFilterExAction action,ref CHANGEFILTERSTRUCT changeInfo);

.

Private Shared Function ChangeWindowMessageFilterEx(hWnd As IntPtr, msg As UInteger, action As ChangeWindowMessageFilterExAction, ByRef changeInfo As CHANGEFILTERSTRUCT) As <MarshalAs(UnmanagedType.Bool)> Boolean

.

    public enum ChangeWindowMessageFilterExAction : uint

.

    Private Enum ChangeWindowMessageFilterExAction As UInteger

.

    Private Enum ChangeWindowMessageFilterFlags As UInteger

.

ChangeWindowMessageFilterEx(Handle,_message,ChangeWindowMessageFilterExAction.Allow, IntPtr.Zero);

.

        ChangeWindowMessageFilterEx(Handle,_message,ChangeWindowMessageFilterExAction.Allow, ref filterStatus);

.
Documentation
[ChangeWindowMessageFilterEx] on MSDN
.

Windows allows only one caret per message queue. To add a caret to a control, handle the WM_SETFOCUS message, or the GotFocus event, or override OnGotFocus if you're writing a custom control, and call CreateCaret from the message or event handler. You should also handle WM_KILLFOCUS, LostFocus or OnLostFocus and call DestroyCaret. You will also need to call ShowCaret to make the caret visible, and SetCaretPos to set its position.

.

    public const uint WM_DRAWITEM = 0x002b;

.

    public const uint WM_MEASUREITEM = 0x002c;

.

/// <param name="hInstance">Handle to the instance of the module to be associated with the window.</param> <param name="lpParam">Pointer to a value to be passed to the window through the CREATESTRUCT structure (lpCreateParams member) pointed to by the lParam param of the WM_CREATE message. This message is sent to the created window by this function before it returns.

.

/// <item>if one of the controls in the dialog template is not registered, or its window window procedure fails WM_CREATE or WM_NCCREATE</item>

.

''' <param name="hInstance">Handle to the instance of the module to be associated with the window.</param> <param name="lpParam">Pointer to a value to be passed to the window through the CREATESTRUCT structure (lpCreateParams member) pointed to by the lParam param of the WM_CREATE message. This message is sent to the created window by this function before it returns.

.

''' <item>if one of the controls in the dialog template is not registered, or its window window procedure fails WM_CREATE or WM_NCCREATE</item>

.

When you call this function, the WndProc function must respond to the WM_NCCREATE message by returning TRUE. If it does not, the creation process will fail. A null handle will be returned from CreateWindowEx and GetLastError will return 0. See MSDN on WM_NCCREATE (http://msdn.microsoft.com/en-us/library/ms632635.aspx) and also WM_CREATE (http://msdn.microsoft.com/en-us/library/ms632619.aspx). You can have your WndProc call DefWindowProc, which will take care of this issue.

.

                switch ((WM)message)

.

                    case WM.PAINT:

.

                    case WM.DESTROY:

.

                return Win32.DefWindowProc(hWnd, (WM)message, wParam, lParam);

.

    ///<Summary>Sends a WM_NCCALCSIZE message to the window, even if the window's size is not being changed. If this flag is not specified, WM_NCCALCSIZE is sent only when the window's size is being changed.</Summary>

.

    ///<Summary>Prevents the window from receiving the WM_WINDOWPOSCHANGING message.</Summary>

.

    '''<Summary>Sends a WM_NCCALCSIZE message to the window, even if the window's size is not being changed. If this flag is not specified, WM_NCCALCSIZE is sent only when the window's size is being changed.</Summary>

.

    '''<Summary>Prevents the window from receiving the WM_WINDOWPOSCHANGING message.</Summary>

.

/// <para>The DestroyWindow function destroys the specified window. The function sends WM_DESTROY and WM_NCDESTROY messages to the window to deactivate it and remove the keyboard focus from it. The function also destroys the window's menu, flushes the thread message queue, destroys timers, removes clipboard ownership, and breaks the clipboard viewer chain (if the window is at the top of the viewer chain).</para>

.

''' <para>The DestroyWindow function destroys the specified window. The function sends WM_DESTROY and WM_NCDESTROY messages to the window to deactivate it and remove the keyboard focus from it. The function also destroys the window's menu, flushes the thread message queue, destroys timers, removes clipboard ownership, and breaks the clipboard viewer chain (if the window is at the top of the viewer chain).</para>

.
Summary
.

static extern bool DrawMenuBar(IntPtr hWnd);

.

    static extern bool DrawMenuBar(IntPtr hWnd);

.

              DrawMenuBar(frm.Handle);

.
Documentation
[DrawMenuBar] on MSDN
.

    private const UInt32 WM_CLOSE = 0x0010;

.

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

.

        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.

.

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

.

    static extern bool DrawMenuBar(IntPtr hWnd);

.

              DrawMenuBar(frm.Handle);

.

Sendmessage(hwndMain, WM_COMMAND, intMID,  0) 'Click the MenuItem!

.

        if (m.Msg == (int)WindowMessages.RawInput)  // WindowMessages.RawInput = 0x00FF (WM_INPUT)

.

Sendmessage(hwndMain, WM_COMMAND, intMID,  0) 'Click the MenuItem!

.

    static extern bool DrawMenuBar(IntPtr hWnd);

.

              DrawMenuBar(frm.Handle);

.

    static extern bool DrawMenuBar(IntPtr hWnd);

.

        DrawMenuBar(handle);

.
Summary
.

static extern uint GetWindowModuleFileName(IntPtr hwnd,

.

  Private Shared Function GetWindowModuleFileName(hwnd As IntPtr, _

.

GetWindowModuleFileName(hwnd, fileName, 2000);

.
Documentation
[GetWindowModuleFileName] on MSDN
.

    const UInt32 SW_SHOWMINIMIZED =    2;

.

    const UInt32 SW_SHOWMAXIMIZED =    3;

.

    const UInt32 SW_SHOWMINNOACTIVE =  7;

.

///     WM_GETTEXTLENGTH message to be sent to the specified window or control.<br />Under certain conditions, the

.

///     <br />To obtain the exact length of the text, use the WM_GETTEXT, LB_GETTEXT, or CB_GETLBTEXT messages, or the

.

    <MarshalAs(UnmanagedType.U4)> ByVal dwMilliseconds as Int32, _

.

     Byval prmdwMiliseconds as Long _

.

dwMilliseconds

.

Messagebox wont time out if dwMilliseconds is 0

.

   uint dwMilliseconds, uint dwWakeMask, uint dwFlags);

.

                ByVal dwMilliseconds As Integer, _

.

        int dwMilliseconds,

.

   uint dwMilliseconds, uint dwWakeMask, uint dwFlags);

.

                ByVal dwMilliseconds As Integer, _

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


 
Access PInvoke.net directly from VS: