Reputation: 1
I'm making an MDI application in which I would like to use the StyleManager for the mdi parent and childs. It works fine except for an MDI child called with the `ShowDialog() method. Is there a way to style a modal form the same way as a non-modal form (having the same titlebar, style, color, ...)?
Upvotes: -1
Views: 698
Reputation: 1
I want the Edit Account form is displayed as the form Manage Accounts. I want to keep the same display style as the main application. in fact I use a stylemanger in the main application.
this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2016;
this is my code:
public partial class frmMain : RibbonForm
{
public frmAccounts fA = new frmAccounts();
private void btn_accounts_Click(object sender, EventArgs e)
{
fA.Show();
fA.MdiParent = this;
}
}
Result:
public partial class frmAccounts : OfficeForm
{
private void btn_edit_Click(object sender, EventArgs e)
{
frmEditAccount ed = new frmEditAccount();
ed.EnableCustomStyle = true ;
DialogResult res =ed.ShowDialog();
if (res == System.Windows.Forms.DialogResult.OK)
{
.....
....
}
}
}
Upvotes: 0