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

shell32

.

            CSIDL_SENDTO            = 0x0009,    // <user name>\SendTo

.

        /// The file system directory that contains Send To menu items. A typical path is C:\Documents and Settings\username\SendTo.

.

        CSIDL_SENDTO = 0x0009,

.

    private void btnBrowse_Click(object sender, EventArgs e)

.

private void fileSystemWatcher_Renamed(object sender, RenamedEventArgs e)

.

private void fileSystemWatcher_Deleted(object sender, FileSystemEventArgs e)

.

private void fileSystemWatcher_Created(object sender, FileSystemEventArgs e)

.

private void mnuDynamic_Click(object sender, System.EventArgs e)

.

    MenuItem theMenuItem = (MenuItem) sender;

.

///     Sends an appbar message to the system.

.

///     C++ ( dwMessage [in] Type: DWORD )<br />Appbar message value to send. This parameter can be one of the following

.

///         send notification messages to the appbar.

.

    Private Overloads Sub OnLoad(ByVal sender As Object, ByVal e As System.EventArgs)

.

    Private Overloads Sub OnClosing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)

.

        // Constants for sending and receiving messages in BrowseCallBackProc

.

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

.

        public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, string lParam);

.

                //Win32.SendMessage(new HandleRef(null, hWnd), BFFM_SETSELECTIONA, 1, lpData);

.

                SendMessage(new HandleRef(null, hWnd), BFFM_SETSELECTIONW, 1, _initialPath);

.

                SendMessage(new HandleRef(null, hWnd), BFFM_SETSTATUSTEXTW, 0, pathPtr);

.

I tried to use this to send files to the recycle bin. It failed (Marshal.GetLastWin32Error was 6, invalid handle) and sometimes threw a NullReferenceException. To make it work I did the following;

.

        CSIDL_SENDTO          = 0x0009,    // <user name>\SendTo

.

    public static readonly Guid SendTo = new Guid( "8983036C-27C0-404B-8F08-102D10DCFD74" );

.

    SENDTO = &H9

.

        CSIDL_SENDTO        = 0x0009,    // <user name>\SendTo

.

    public static Guid SendTo = new Guid("8983036C-27C0-404B-8F08-102D10DCFD74");

gdi32

.

    private void timer1_Tick(object sender, EventArgs e)

.

    private void Form_Paint( object p_SenderObject, System.Windows.Forms.PaintEventArgs p_Arguments )

.

private void button1_Click(object sender, EventArgs e)

.

  static private void myControl_MouseMove(object sender,System.Windows.Forms.MouseEventArgs e)

.

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

.

        //This version of SendMessage is a blocking call until all windows respond.

.

        long result = SendMessage(HWND_BROADCAST, WindowsMessages.WM_FONTCHANGE, IntPtr.Zero, IntPtr.Zero);

.

private void button1_Click(object sender, EventArgs e)

.

private void tabControl1_DrawItem(object sender, DrawItemEventArgs e)

.

        private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)

.

        private void Form1_Resize(object sender, System.EventArgs e)

.

        private void menuItem2_Click(object sender, System.EventArgs e)

.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

coredll

.

    private void GoodStuff(object sender, EventArgs e)

.
Summary
This function allows you to send and receive data to control certain devices of your CE device.
.

a godsend for backwards portability

.

    public const int SWP_NOSENDCHANGING = 0x0400;

.

    Public Const SWP_NOSENDCHANGING As Integer = &H400

.

private void Form_Load(object sender, System.EventArgs e)

.

private void SendToBack()

.

Use String.Format() to create the string before sending it to the native API to avoid the multiple vars version of the native function.

.

static extern uint SendInput(uint cInputs, /* [MarshalAs(UnmanagedType.LPArray)] */ KEYBOARDINPUT[] inputs, int cbSize);

.

Declare Function SendInput Lib "coredll.dll" (TODO) As TODO

.

        public static extern uint SendInput(uint cInputs, /* [MarshalAs(UnmanagedType.LPArray)] */ KEYBOARDINPUT[] inputs, int cbSize);

.

        retVal = cTabControl.SendInput(2, inputs, 0x001C);

.

        throw new Exception(string.Format("SendInput() returned {0}.", error));

.

        retVal = cTabControl.SendInput(4, inputs, 0x001C);

.

        throw new Exception(string.Format("SendInput() returned {0}.", error));

.

        retVal = cTabControl.SendInput(4, inputs, 0x001C);

.

        throw new Exception(string.Format("SendInput() returned {0}.", error));

.

        retVal = cTabControl.SendInput(6, inputs, 0x001C);

.

        throw new Exception(string.Format("SendInput() returned {0}.", error));

.
Documentation
[SendInput] on MSDN
.

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

.

Declare Function SendMessage Lib "coredll.dll" (ByVal hWnd As IntPtr, ByVal Msg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As IntPtr

.

If you are searching for a way to send keys to an application, you can use System.Windows.Forms.SendKeys.Send(keys) after bringing the window to the top via the SetForegroundWindow API.

.

    private void button1_Click(object sender, EventArgs e)

.

    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);

.

    private void button2_Click(object sender, EventArgs e)

.

    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);

.

    private void button2_Click(object sender, EventArgs e)

.

    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);

.

    private void Form1_Load(object sender, EventArgs e)

.

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

.
Documentation
.

private void SendToBack ()

.

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

.

        SendMessage(Handle, EM_LINESCROLL, 0, Row);

.

    private void btnGet_Click(object sender, EventArgs e)

.

    private void btnSet_Click(object sender, EventArgs e)

.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

.

     private void Button1_Click(object sender, System.EventArgs e)

.

    public const int SWP_NOSENDCHANGING = 0x0400;

.

    Public Const SWP_NOSENDCHANGING As Integer = &H400

.

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

.

        /// <remarks>SWP_NOSENDCHANGING</remarks>

.

        DoNotSendChangingEvent = 0x0400,

.

    void SendWPFWindowToBack(Window window)

.
Summary
This function sends a message to the system to add, modify, or delete an application-specific icon from the taskbar status area. It does not affect icons appearing on the home screen.
.

private void button1_Click(object sender, EventArgs e)

.

private void menuItem1_Click(object sender, EventArgs e)

iphlpapi

.

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click

.

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

.
Summary
Send ARP message to a Network Card in the LAN
.

  public static extern int SendARP(

.

  Declare Function SendARP Lib "iphlpapi.dll" (

.

SendARP returns 0 on success. The parameter SrcIP can be 0.

.

    SendARP(CType(addr.Address, UInt32), 0, mac, len)

.

int retValue = SendARP(uintAddress, 0, macAddr, ref macAddrLen);

.

    throw new Win32Exception(retValue, "SendARP failed.");

.
Documentation
[SendARP] on MSDN
.

    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click

netapi32

.
Summary
This function sends a buffer of information to a registered message alias.
.

static extern int NetMessageBufferSend(

.

    ''' The NetMessageBufferSend function sends a buffer of information to a registered message alias.

.

    ''' Windows NT:  No special group membership is required to execute the NetMessageBufferSend function on a LAN Manager or a Windows NT system.

.

    ''' Admin, Accounts, Print, or Server Operator group membership is required to successfully execute NetMessageBufferSend on a remote server.

.

    Public Declare Function NetMessageBufferSend Lib "netapi32.dll" _

.

The Alerter service must be running for NetMessageBufferSend to function.

.

This is a simple console program which lets you send messages (quite similar to the NET SEND command...).

.
Usage
sendnetmsg.exe srcName dstName message
.

public class SendNetMsg

.

    public static extern int NetMessageBufferSend(

.

        Console.WriteLine ("sendnetmsg.exe srcName dstName msg");

.

        int retVal = NetMessageBufferSend (null, argv[1], argv[0], argv[2], argv[2].Length * 2);    

.
Documentation
[NetMessageBufferSend] on MSDN
.

        private static extern int NetMessageBufferSend(

.

        public static int NetMessageSend(string serverName,string messageName,string fromName,string strMsgBuffer, int iMsgBufferLen)

.

            return NetMessageBufferSend(serverName,messageName,fromName,strMsgBuffer,iMsgBufferLen*2);

.

private void button1_Click(object sender, System.EventArgs e)

.

            ' Note: By Sending Null were looking at current machine

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.

.
Summary
.

    private void button1_Click(object sender, System.EventArgs e) {

.

    Private Sub TextBox1_GotFocus(sender As Object, e As EventArgs) Handles TextBox1.GotFocus

.

    ///<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>

.

    SWP_NOSENDCHANGING = 0x0400,

.

    '''<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>

.

    SWP_NOSENDCHANGING = &H0400

.

    SWP_NOSENDCHANGING As Integer = &H0400

.

/// <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>

.

btnCloseWindow_Click(object sender, EventArgs e)

.

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

.

     private void label1_Click(object sender, EventArgs e)

.

    Private Sub label1_Click(sender As Object, e As EventArgs)

.

     private void button1_Click(object sender, EventArgs e)

.

     private void button2_Click(object sender, EventArgs e)

.

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

.

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

.

    private void timer1_Tick(object sender, EventArgs e)

.

     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

.

Private Sub Button1_Click(ByVal sender As System.Object, _

.

     private void button1_Click(object sender, EventArgs e)

.

     private void button2_Click(object sender, EventArgs e)

.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

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


 
Access PInvoke.net directly from VS: