Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm assuming you want to do this programatically in C#?</p> <p>You'll need to define this P/Invoke inside your class:</p> <pre><code>[DllImport("user32.dll")] static extern int SetWindowText(IntPtr hWnd, string text); </code></pre> <p>Then have some code that looks similar to the following:</p> <pre><code>Process visualStudioProcess = null; //Process[] allProcesses = Process.GetProcessesByName("VCSExpress"); // Only do this if you know the exact process name // Grab all of the currently running processes Process[] allProcesses = Process.GetProcesses(); foreach (Process process in allProcesses) { // My process is called "VCSExpress" because I have C# Express, but for as long as I've known, it's been called "devenv". Change this as required if (process.ProcessName.ToLower() == "vcsexpress" || process.ProcessName.ToLower() == "devenv" /* Other possibilities*/) { // We have found the process we were looking for visualStudioProcess = process; break; } } // This is done outside of the loop because I'm assuming you may want to do other things with the process if (visualStudioProcess != null) { SetWindowText(visualStudioProcess.MainWindowHandle, "Hello World"); } </code></pre> <p>Doc on Process: <a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx</a></p> <p>Doc on P/Invoke: <a href="http://msdn.microsoft.com/en-us/library/aa288468%28VS.71%29.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/aa288468%28VS.71%29.aspx</a></p> <p>Trying this code on my local, it seems to set the window title, but Visual Studio overwrites it under many conditions: gains focus, enters/leaves debug mode... This could be troublesome.</p> <p>Note: You can GET the window title straight from the Process object, but you can't set it.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload