日期:2014-05-19  浏览次数:20950 次

高手们!救急啊!Frame问题!!急!!急!!急!
这是一个仿Outlook2000做的一个主界面,开始右边默认调用Form1,我想点击左边的菜单调用其他的Form。
高手们,我是一个新手,帮帮我啊,急!!急!!急!!急!!急!!急!!急!!


代码如下:

private   LumiSoft.UI.Controls.WFrame   wFrame1;
private   System.ComponentModel.IContainer   components;
private   System.Windows.Forms.ImageList   imageList1;

private   LumiSoft.UI.Controls.WOutlookBar.WOutlookBar   outlookBar   =   null;
                 
public   MainForm()
{
//
//   Required   for   Windows   Form   Designer   support
//
InitializeComponent();

//
//   TODO:   Add   any   constructor   code   after   InitializeComponent   call
//

InitBar();

wFrame1.Frame_BarControl   =   outlookBar;
wFrame1.Frame_Form   =   new   Form1(wFrame1);       //开始右边默认调用Form1,我想点击左边的菜单调用其他的Form
}


#region   OutlookBar   Click   stuff

///   <summary>
///   OutlookBar   Click
///   </summary>
private   void   wOutlookBar_ItemClicked(object   sender,   LumiSoft.UI.Controls.WOutlookBar.ItemClicked_EventArgs   e)
{
MessageBox.Show(e.Item.Caption);
}

#endregion


#region   function   InitBar

private   void   InitBar()
{
outlookBar   =   new   LumiSoft.UI.Controls.WOutlookBar.WOutlookBar();
outlookBar.ImageList   =   this.imageList1;
outlookBar.ItemClicked   +=   new   LumiSoft.UI.Controls.WOutlookBar.ItemClickedEventHandler(this.wOutlookBar_ItemClicked);

Item   it   =   null;
Bar   bar   =   null;
// Bar   a   =   outlookBar.Bars.Add( "ViewStyle ");
// a.Items.Add( "Set   ViewStyle ",0);

Bar   stuckingTest   =   outlookBar.Bars.Add( "Stucking   test ");
stuckingTest.Items.Add( "Can   stuck ",0);
stuckingTest.Items.Add( "Can   stuck ",0);

it   =   stuckingTest.Items.Add( "Can 't   stuck ",0);
it.AllowStuck   =   false;

stuckingTest.Items.Add( "Can 't   stuck ",0);

bar   =   outlookBar.Bars.Add( "Full   item   select ");
bar.ItemsStyle   =   ItemsStyle.FullSelect;
bar.Items.Add( "Item   a ",0);
bar.Items.Add( "Item   b ",0);

bar   =   outlookBar.Bars.Add( "This   is   multi   line   bar   text   test ");
bar.Items.Add( "This   is   multiline   item   caption   test ",0);
bar.Items.Add( "For   some   reason   many   comercical   Outlook   bars   wont   do   it. ",0);
bar.Items.Add( "Is   it   nicer   to   see   ... ",0);

bar   =   outlookBar.Bars.Add( "决策分析 ");
//bar.Caption= "123 ";
//bar.Caption= "1234 ";
bar.Items.Add( "2 ",0);
//bar..Items.Add(new   Form2(wFrame1),1);
bar.Items.Add( "3 ",2);

bar   =   outlookBar.Bars.Add( "系统管理 ");
//bar.Caption= "123 ";
//bar.Caption= "1234 ";