Hi, bucz,
Yes, you should inherit from CommonDialog.
For example,
Code Snippet
public partial class CustomControl1 : CommonDialog
{
Form newform;
public CustomControl1()
{
InitializeComponent();
this.Reset();
newform = new Form();
newform.StartPosition = FormStartPosition.CenterParent;
newform.Text = "About";
newform.Width = 200;
newform.Height = 100;
}
protected override bool RunDialog(IntPtr hwndOwner)
{
newform.ShowDialog();
return true;
}
public override void Reset()
{
if (newform != null)
{
newform.Dispose();
}
}
}
Hi, bucz,
Yes, you should inherit from CommonDialog.
For example,
Code Snippet
public partial class CustomControl1 : CommonDialog
{
Form newform;
public CustomControl1()
{
InitializeComponent();
this.Reset();
newform = new Form();
newform.StartPosition = FormStartPosition.CenterParent;
newform.Text = "About";
newform.Width = 200;
newform.Height = 100;
}
protected override bool RunDialog(IntPtr hwndOwner)
{
newform.ShowDialog();
return true;
}
public override void Reset()
{
if (newform != null)
{
newform.Dispose();
}
}
}
You can use google to search for other answers