Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than user32, prefix the name with the module name and a period.
SetWindowText (user32)
.
C# Signature:
/// <summary>
/// Changes the text of the specified window's title bar (if it has one). If the specified window is a control, the
/// text of the control is changed. However, SetWindowText cannot change the text of a control in another application.
/// <para>
/// Go to https://msdn.microsoft.com/en-us/library/windows/desktop/ms633546%28v=vs.85%29.aspx for more
/// information
/// </para>
/// </summary>
/// <param name="hwnd">C++ ( hWnd [in]. Type: HWND )<br />A handle to the window or control whose text is to be changed.</param>
/// <param name="lpString">C++ ( lpString [in, optional]. Type: LPCTSTR )<br />The new title or control text.</param>
/// <returns>
/// If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.<br />
/// To get extended error information, call GetLastError.
/// </returns>
/// <remarks>
/// If the target window is owned by the current process, <see cref="SetWindowText" /> causes a WM_SETTEXT message to
/// be sent to the specified window or control. If the control is a list box control created with the WS_CAPTION style,
/// however, <see cref="SetWindowText" /> sets the text for the control, not for the list box entries.<br />To set the
/// text of a control in another process, send the WM_SETTEXT message directly instead of calling
/// <see cref="SetWindowText" />. The <see cref="SetWindowText" /> function does not expand tab characters (ASCII code
/// 0x09). Tab characters are displayed as vertical bar(|) characters.<br />For an example go to
/// <see cref="!:https://msdn.microsoft.com/en-us/library/windows/desktop/ms644928%28v=vs.85%29.aspx#sending">
/// Sending a
/// Message.
/// </see>
/// </remarks>
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
public static extern bool SetWindowText(IntPtr hwnd, String lpString);
VB.Net Signature:
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
Private Shared Function SetWindowText(ByVal hwnd As IntPtr, ByVal lpString As String) As Boolean
End Function
VB Signature:
Declare Auto Function SetWindowText Lib "user32" (ByVal hWnd As IntPtr, ByVal lpstring As String) As Boolean
User-Defined Types:
None.
Notes:
The handle used cannot be used to make a Form from Form.FromHandle() or from Control.FromHandle().
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).