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

user32

.
Summary
.

///     text of the control is changed. However, SetWindowText cannot change the text of a control in another application.

.

///     If the target window is owned by the current process, <see cref="SetWindowText" /> causes a WM_SETTEXT message to

.

///     however, <see cref="SetWindowText" /> sets the text for the control, not for the list box entries.<br />To set the

.

///     <see cref="SetWindowText" />. The <see cref="SetWindowText" /> function does not expand tab characters (ASCII code

.

public static extern bool SetWindowText(IntPtr hwnd, String lpString);

.

Private Shared Function SetWindowText(ByVal hwnd As IntPtr, ByVal lpString As String) As Boolean

.

Declare Auto Function SetWindowText Lib "user32" (ByVal hWnd As IntPtr, ByVal lpstring As String) As Boolean

.

SetWindowText(Process.GetCurrentProcess().MainWindowHandle, "Amazing!");

.
Documentation
[SetWindowText] on MSDN
.
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
.

static extern bool SetWindowText(IntPtr hWnd, string lpString);

.

   if (hWnd != IntPtr.Zero) SetWindowText(hWnd, "Window Found");


 
Access PInvoke.net directly from VS: