別クラス internal class ColorDialogEx : ColorDialog { private Point FPosition; public Point Position { set { FPosition = value; } }
public ColorDialogEx() : base() { }
protected override IntPtr HookProc(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam) { if (msg == 0x110) { // WM_INITDIALOG{ ←ここのif文がおかしいと思われる。 RECT r = new RECT();
[DllImport("user32.dll", CharSet = CharSet.Auto)] private static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
[StructLayout(LayoutKind.Sequential)] private struct RECT { public int left; public int top; public int right; public int bottom; }