在我使用MDI之前,它工作正常,我可以在MainForm中顯示我的ListForm。現在我不想使用MDI,它不起作用。顯示默認格式
前,用MDI:
public partial class Le_MainForm : DevExpress.XtraEditors.XtraForm
{
public Le_MainForm()
{
InitializeComponent();
this.IsMdiContainer = true;
this.Name = "MainUSER";
if (Program.IsFA) barButtonItem_OrdList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
Liste_Ordres f_Liste = new Liste_Ordres();
f_Liste.MdiParent = this;
f_Liste.Show();
}
private void barButtonItem_ListeOrdres_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
Close_AllForm();
Liste_Ordres f_Liste = new Liste_Ordres();
f_Liste.MdiParent = this;
f_Liste.Show();
}
private void barButtonItem_CreatOrdreAller_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
Close_AllForm();
Program.AllerRetour = "Ordre Aller";
Fiche_Ordre f_Fiche = new Fiche_Ordre();
f_Fiche.MdiParent = this;
f_Fiche.Show();
}
現在,經過我消除了MDI //this.IsMdiContainer = true;
,並從MainForm中繼承的形式:
public partial class Liste_Ordres : Le_MainForm
{
.....
我不能顯示我的ListeForm在MainFrom
public partial class Le_MainForm : DevExpress.XtraEditors.XtraForm
{
public Le_MainForm()
{
InitializeComponent();
//this.IsMdiContainer = true;
this.Name = "MainUSER";
if (Program.IsFA) barButtonItem_OrdList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
Liste_Ordres f_Liste = new Liste_Ordres();
// f_Liste.MdiParent = this;
f_Liste.Show();
}
有人有什麼想法嗎?
表單沒有apear或什麼? – Likurg 2012-04-27 13:13:17
它沒有出現該程序不是形式 – user609511 2012-04-27 13:15:19
爲什麼你的其他形式繼承自MainForm? – Servy 2012-04-27 13:21:14