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]

dbghelp

.

  /// <param name="sender"></param>

.

static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)

winmm

.
Summary
The mciSendString function sends a command string to an MCI device. The device that the command is sent to is specified in the command string [This page was changed by iMpostoR]
.

static extern Int32 mciSendString(string command, StringBuilder buffer, int bufferSize, IntPtr hwndCallback);

.

Private Shared Function mciSendString(ByVal command As String, ByVal buffer As StringBuilder, ByVal bufferSize As Integer, ByVal hwndCallback As IntPtr) As Integer

.

Declare Ansi Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal command As String, ByRef buffer As StringBuilder, ByVal bufferSize As Integer, ByVal hWndCallback As IntPtr) As Integer

.

    mciSendString("set CDAudio door open", returnstring,127, IntPtr.Zero);

.

mciSendString(sCommand, null, 0, 0);

.

mciSendString(sCommand, null, 0, _frmObject.Handle.ToInt64());

.

static extern Int32 mciSendString(string command, string buffer, int bufferSize, IntPtr hwndCallback);

.

     mciSendString("set CDAudio door open", rt, 127, IntPtr.Zero);

.

     mciSendString("set CDAudio door closed", rt, 127, IntPtr.Zero);

.

     mciSendString("set CDAudio door open", returnstring, 127, IntPtr.Zero)

.

     mciSendString(sCommand, Nothing, 0, IntPtr.Zero)

.

     mciSendString(sCommand, Nothing, 0, Me.Handle.ToInt64())

.
Documentation
[mciSendString] on MSDN
.

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

.

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

.
Summary
The waveInAddBuffer function sends an input buffer to the given waveform-audio input device.

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

.

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

.

        QS_SENDMESSAGE =    0x0040,

.

        QS_ALLINPUT = (QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY | QS_SENDMESSAGE)

.

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

.

     private void Form1_Load(object sender,EventArgs e)

.

    private void Form1_Load(object sender, EventArgs e)

.

    Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click

.

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

.

Private Sub tb_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles tb.GotFocus

.
Summary
.

static extern InSendMessageExFlags InSendMessageEx(IntPtr lpReserved);

.

InSendMessageExFlags

.
Documentation
[InSendMessageEx] on MSDN
.

    private void button1_Click(object sender, EventArgs e)

.

// Sends ENTER button press event in focused window

.

     private void timer1_Tick(System.Object sender, System.EventArgs e)

.

' Sends ENTER button press event in focused window

.

     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, ByVal e As System.EventArgs) Handles Button1.Click

.

Alternative Managed API: System.Windows.Forms.SendKeys

.

    private void Compare(object sender, string expected, string actual)

.

        Button ClickedButton = (Button)sender;

.

    private void buttonNumericAccept_Click(object sender, EventArgs e)

.

        // Send Appropriate Key Presses

.

        Compare(sender, expected, NumericTextbox.Text);        

.

    private void Surface_MouseEnter(object sender, EventArgs e)

.

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

.

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

.

    private void Surface_MouseEnter(object sender, EventArgs e)

.

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

.

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

.

private void button1_Click(object sender, EventArgs e)

.

FYI, Microsoft tells us for "Windows NT/2000/XP: This function has been superseded. Use SendInput instead."

.

     private void timer1_Tick(System.Object sender, System.EventArgs e)

.

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

.

    Private Sub cmdClick_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdClick.Click

.

    Private Sub picClicker_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles picClicker.Click

.

    Private Sub picClicker_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles picClicker.MouseDown

.

    Private Sub picClicker_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles picClicker.MouseUp

.

Thus I have resigned myself to unmanaged code for now. I will post the SendInput version shortly as mouse_event has been deprecated by Bill in favor of SendInput.

.

    Private Sub ResizeMe_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ResizeMe.MouseMove

.

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

.

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

.

private void Paint(object sender, PaintEventArgs e)

.

MSDN recommends using PostQuitMessage over PostMessage when you want to send WM_QUIT http://msdn.microsoft.com/en-us/library/ms632641%28v=vs.85%29.aspx

.
Summary
Registers a device to send its raw input data.
.

///     when sending or posting messages.

.

///     <see cref="RegisterWindowMessage" /> when more than one application must process the same message.For sending

.

Win32.SendMessageTimeout(windowHandle, lMsg, IntPtr.Zero, IntPtr.Zero, SendMessageTimeoutFlags.SMTO_ABORT_IF_HUNG, 1000, out lRes);

.

    Private Shared Function SendMessage(ByVal hWnd As IntPtr,

.

    Private Sub Form1_MouseDown(sender As Object, e As MouseEventArgs) Handles Me.MouseDown

.

        SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0)

.

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

.

private void control_MouseDown(object sender, MouseEventArgs e)

.

   Control ctrl = sender as Control;

.

   SendMessage(ctrl.Handle, WM_SYSCOMMAND, MOUSE_MOVE, ref nul);

.

  private static extern UInt32 SendMessage(

.

  lResult = SendMessage(  // returns LRESULT in lResult

.

    private static extern uint SendMessage(

.

    private static extern uint SendMessage(

.

        return (int)SendMessage(this._handle, SB_GETPARTS, 0, 0);

.

        uint length = (uint)SendMessage(this._handle, SB_GETTEXTLENGTH, index, 0);

.

            StatusBar.SendMessage(this._handle, SB_GETTEXT, (IntPtr)index, allocated);

.

/// If SW_INVALIDATE, don't send WM_ERASEBACKGROUND.

.

unsafe private void hScrollBar1_Scroll( object sender, ScrollEventArgs e )

.
Summary
.

static extern IntPtr SendDlgItemMessage(IntPtr hDlg, int nIDDlgItem, uint Msg,

.

Private Shared Function SendDlgItemMessage(ByVal hDlg As IntPtr, _

.

Private Declare Function SendDlgItemMessage Lib "user32" (ByVal hDlg As IntPtr, _

.

        SendDlgItemMessage(theDialogBoxHandle, theNoButtonItemId, theClickMessage, wParam, lParam)

.
Documentation
[SendDlgItemMessage] on MSDN
.
Summary
.

The SendInput function synthesizes keystrokes, mouse motions, and button clicks to the currently active window

.

   internal static extern uint SendInput (uint nInputs,

.

Friend Shared Function SendInput(<[In]()> ByVal nInput As UInt32,

.

Private Declare Function SendInput Lib "user32.dll" (ByVal cInputs As Integer, ByRef pInputs As INPUT, ByVal cbSize As Integer) As Integer

.

   Api.user32.SendInput((uint)pInputs.Length, pInputs, StructLib.INPUT.Size);

.

   Start-Sleep 2 ; [Testing.Windows3]::SendInput($_inputArray.count, $_inputArray, [Runtime.InteropServices.marshal]::SizeOf($_inputArray[0]))

.
Documentation
[SendInput] on MSDN
.
Summary
.

public static extern IntPtr SendMessageTimeout(

.

    SendMessageTimeoutFlags fuFlags,

.

public static extern IntPtr SendMessageTimeout(

.

    SendMessageTimeoutFlags flags,

.

[DllImport("user32.dll", EntryPoint = "SendMessageTimeout", SetLastError=true, CharSet=CharSet.Auto)]

.

public static extern uint SendMessageTimeoutText(

.

    SendMessageTimeoutFlags flags,

.

[DllImport("user32.dll", EntryPoint = "SendMessageTimeout", CharSet = CharSet.Auto)]

.

public static extern int SendMessageTimeout(

.

SendMessageTimeoutFlags

.

Public Sub SendMessageTimeout(ByVal windowHandle As IntPtr,ByVal Msg As Integer,ByVal wParam As IntPtr,ByVal lParam As IntPtr,ByVal flags As SendMessageTimeoutFlags,ByVal timeout As Integer,ByRef result As IntPtr)

.

Public Shared Function SendMessageTimeout(ByVal windowHandle As IntPtr, ByVal Msg As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr, ByVal flags As SendMessageTimeoutFlags, ByVal timeout As Integer, ByRef result As IntPtr) As IntPtr

.

Win32.SendMessageTimeout(windowHandle, lMsg, IntPtr.Zero, IntPtr.Zero, SendMessageTimeoutFlags.SMTO_ABORT_IF_HUNG, 1000, out lRes);

.

    int result = SendMessageTimeout(hwnd, WM_GETTEXTLENGTH, 0, 0, 0X2C, 5, out length); //0X2C = SMTO_ABORTIFHUNG | SMTO_BLOCK | SMTO_NOTIMEOUTIFNOTHUNG | SMTO_ERRORONEXIT

.
Documentation
[SendMessageTimeout] on MSDN
.
Summary
.

static extern bool SendMessageCallback(IntPtr hWnd, uint Msg, UIntPtr wParam,

.

    IntPtr lParam, SendMessageDelegate lpCallBack, UIntPtr dwData);

.

C# signature for the SendMessageDelegate:

.

delegate void SendMessageDelegate(IntPtr hWnd, uint uMsg, UIntPtr dwData, IntPtr lResult);

.
Documentation
[SendMessageCallback] on MSDN
.
Summary
.

public static extern IntPtr SendMessageTimeout(

.

    SendMessageTimeoutFlags fuFlags,

.

public static extern IntPtr SendMessageTimeout(

.

    SendMessageTimeoutFlags flags,

.

[DllImport("user32.dll", EntryPoint = "SendMessageTimeout", SetLastError=true, CharSet=CharSet.Auto)]

.

public static extern uint SendMessageTimeoutText(

.

    SendMessageTimeoutFlags flags,

.

SendMessageTimeoutFlags

.

Public Sub SendMessageTimeout(ByVal windowHandle As IntPtr,ByVal Msg As Integer,ByVal wParam As IntPtr,ByVal lParam As IntPtr,ByVal flags As SendMessageTimeoutFlags,ByVal timeout As Integer,ByRef result As IntPtr)

.

Public Shared Function SendMessageTimeout(ByVal windowHandle As IntPtr, ByVal Msg As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr, ByVal flags As SendMessageTimeoutFlags, ByVal timeout As Integer, ByRef result As IntPtr) As IntPtr

.

Win32.SendMessageTimeout(windowHandle, lMsg, IntPtr.Zero, IntPtr.Zero, SendMessageTimeoutFlags.SMTO_ABORT_IF_HUNG, 1000, out lRes);

.
Documentation
[SendMessageTimeout] on MSDN
.
Summary
.

static extern bool SendNotifyMessage(IntPtr hWnd, uint Msg, UIntPtr wParam,

.

Public Function SendNotifyMessage( _

.

Public Declare Function SendNotifyMessage Lib "user32.dll" Alias "SendMessageA" ( _

.
Documentation
[SendNotifyMessage] on MSDN
.

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

.

            SendMessage(hWndNextWindow, m.Msg, m.WParam, m.LParam);

.

            SendMessage(hWndNextWindow, m.Msg, m.WParam, m.LParam);

.

I've got problems with SendKeys method, doesn't work. So this API function is a good alternative.

.

    Private Sub cmdNumLock_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdNumLock.Click

.

    Private Sub cmdCapsLock_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCapsLock.Click

.

.NET 1.1: SendKeys method (System.Windows.Forms)

.

.NET 2.0: My.Computer.Keyboard.SendKeys

.

    private void button4_Click(object sender, EventArgs e)

.

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

.

    SendMessage(proc.MainWindowHandle, WM_SYSCOMMAND, SC_MAXIMIZE, 0);

.

     private void button1_Click(object sender, EventArgs e)

.

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

.

    ///         Applies new frame styles set using the SetWindowLong function. Sends a WM_NCCALCSIZE message

.

    ///         <term>SWP_NOSENDCHANGING (0x0400)</term>

.

   NOSENDCHANGING = 0x0400,

.

        ///     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 is sent only when the window's size is being changed.

.

        SWP_NOSENDCHANGING = 0x0400,

.

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

.

///         Installs a hook procedure that monitors messages before the system sends them to the

.

///     text of a control in another process, send the WM_SETTEXT message directly instead of calling

.

///     <see cref="!:https://msdn.microsoft.com/en-us/library/windows/desktop/ms644928%28v=vs.85%29.aspx#sending">

.

///     Sending a

.
Note
This SetWindowText will set text to the controls(textbox for example) in the same process. If they exist in other processes, use SendMessage instead... - jp
.

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

.

    private void button1_Click(object sender, EventArgs e)

.

    private void button2_Click(object sender, EventArgs e)

.

Const SPIF_SendIniChange As Integer = 2

.

Const SPIF_UpdateAndSend As Integer = SPIF_UpdateIni Or SPIF_SendIniChange '3

.

intReturn = SystemParametersInfo(SPI.SetWallpaper, 0, strFile, SPIF.UpdateAndSend)

58: TCITEM
.

    int res = SendMessage(handle, TCM_GETITEMA, index, tcitemPtr);

.

    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing

.

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

.

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)

odbc32

.

    Private Sub OnGetODBCConnectionNames(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbExpSID.DropDown, cmbImpSid.DropDown

.

    Dim c As ComboBox = sender

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


 
Access PInvoke.net directly from VS: