コード例 #1
0
        public static void RemoveProjectPathToWindowTitle()
        {
            var    handler = User32API.GetCurrentWindowHandle();
            string name    = User32API.GetWindowTitle(handler);

            string path = Directory.GetCurrentDirectory();

            User32API.SetWindowText(handler, name.Replace(" - " + path, ""));
        }
コード例 #2
0
        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);
        }