Binarysharp.MemoryManagement.Windows.WindowCore.SetWindowText C# (CSharp) Method

SetWindowText() public static method

Sets the text of the specified window's title bar.
public static SetWindowText ( IntPtr windowHandle, string title ) : void
windowHandle System.IntPtr A handle to the window whose text is to be changed.
title string The new title text.
return void
        public static void SetWindowText(IntPtr windowHandle, string title)
        {
            // Check if the handle is valid
            HandleManipulator.ValidateAsArgument(windowHandle, "windowHandle");

            // Set the text of the window's title bar
            if (!NativeMethods.SetWindowText(windowHandle, title))
                throw new Win32Exception("Couldn't set the text of the window's title bar.");
        }