public static void RemoveProjectPathToWindowTitle() { var handler = User32API.GetCurrentWindowHandle(); string name = User32API.GetWindowTitle(handler); string path = Directory.GetCurrentDirectory(); User32API.SetWindowText(handler, name.Replace(" - " + path, "")); }
public static void AddProjectPathToWindowTitle() { var handler = User32API.GetCurrentWindowHandle(); string name = User32API.GetWindowTitle(handler); string path = Directory.GetCurrentDirectory(); if (name.Contains(path)) { return; } User32API.SetWindowText(handler, name + " - " + path); }