Professional Documents
Culture Documents
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
namespace SSMS_Window_Fixer
[StructLayout(LayoutKind.Sequential)]
[DllImport("user32.dll")]
public static extern bool GetWindowRect(IntPtr hwnd, ref Rect rectangle);
public static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool
bRepaint);
[DllImport("USER32.DLL")]
[DllImport("USER32.DLL")]
private static extern int GetWindowText(HWND hWnd, StringBuilder lpString, int nMaxCount);
[DllImport("USER32.DLL")]
[DllImport("USER32.DLL")]
[DllImport("USER32.DLL")]
/// <summary>Returns a dictionary that contains the handle and title of all the open
windows.</summary>
/// <returns>A dictionary that contains the handle and title of all the open windows.</returns>
windows[hWnd] = builder.ToString();
return true;
}, 0);
return windows;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
namespace SSMS_Window_Fixer
{
public static class Win32Api
[StructLayout(LayoutKind.Sequential)]
[DllImport("user32.dll")]
public static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool
bRepaint);
[DllImport("USER32.DLL")]
private static extern int GetWindowText(HWND hWnd, StringBuilder lpString, int nMaxCount);
[DllImport("USER32.DLL")]
[DllImport("USER32.DLL")]
[DllImport("USER32.DLL")]
/// <summary>Returns a dictionary that contains the handle and title of all the open
windows.</summary>
/// <returns>A dictionary that contains the handle and title of all the open windows.</returns>
windows[hWnd] = builder.ToString();
return true;
}, 0);
return windows;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
namespace SSMS_Window_Fixer
[StructLayout(LayoutKind.Sequential)]
[DllImport("user32.dll")]
public static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool
bRepaint);
[DllImport("USER32.DLL")]
[DllImport("USER32.DLL")]
private static extern int GetWindowText(HWND hWnd, StringBuilder lpString, int nMaxCount);
[DllImport("USER32.DLL")]
[DllImport("USER32.DLL")]
private static extern bool IsWindowVisible(HWND hWnd);
[DllImport("USER32.DLL")]
/// <summary>Returns a dictionary that contains the handle and title of all the open
windows.</summary>
/// <returns>A dictionary that contains the handle and title of all the open windows.</returns>
windows[hWnd] = builder.ToString();
return true;
}, 0);
return windows;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
namespace SSMS_Window_Fixer
[StructLayout(LayoutKind.Sequential)]
}
[DllImport("user32.dll", CharSet = CharSet.Auto)]
[DllImport("user32.dll")]
public static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool
bRepaint);
[DllImport("USER32.DLL")]
[DllImport("USER32.DLL")]
private static extern int GetWindowText(HWND hWnd, StringBuilder lpString, int nMaxCount);
[DllImport("USER32.DLL")]
[DllImport("USER32.DLL")]
[DllImport("USER32.DLL")]
/// <returns>A dictionary that contains the handle and title of all the open windows.</returns>
windows[hWnd] = builder.ToString();
return true;
}, 0);
return windows;