Unfortunately, changing the name of the general color selection dialog is not possible. A possible solution is to find or create a color selection control for placement in a special form, which, of course, you could assign an appropriate title to. Or you can accept the Office style color picker as a combo box.
EDIT
Inspired by Rob, I found the following solution. It includes inheritance from ColorDialog , snatching HWND from HookProc and calling SetWindowText via P / Invoke:
public class MyColorDialog : ColorDialog
{
[DllImport("user32.dll")]
static extern bool SetWindowText(IntPtr hWnd, string lpString);
private string title = string.Empty;
private bool titleSet = false;
public string Title
{
get { return title; }
set
{
if (value != null && value != title)
{
title = value;
titleSet = false;
}
}
}
protected override IntPtr HookProc(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam)
{
if (!titleSet)
{
SetWindowText(hWnd, title);
titleSet = true;
}
return base.HookProc(hWnd, msg, wparam, lparam);
}
}
source
share