类似于outlook,应该如何实现这样的功能,是使用panel吗?还是有其它办法,谢谢~!
解决方案 »
- .dll
- ObservableCollection数据转换
- 看下我写的邮件发送的代码,为什么我发不出去
- 用鼠标点住左键选择多个同一个界面下的Label 得到Label 的Text 在线等。
- .net下crystal reports問題,up有分,分不夠再加!
- 如何用remoting方式调用水晶报表?用http信道二进制格式化数据时出现版本问题,请高手指点?
- 如何在C#中控制导出的Excel文件的显示属性?
- 请问我如何在一个窗体变化以后将信息传递到另一个已打开的窗体中
- 用C#写体彩软件运行效率如何?
- 如何在WinForm或控制台项目中引用Windows.Media命名空间?
- 请到这个帖子(帖子连接见内)指点迷津
- winform中的A窗体中从库中读张照片(单击按钮显示),然后在B窗体中显示它的放大照片,请教照片是怎么传递的.
这个里面有这样的控件好象是sideBar,自己看下
Form2 f2=new Form2();
f2.TopLevel =false; //这句是关键
f2.Show();
this.Panel1.Controls.Add(f2);
/// Set which panel view
/// </summary>
/// <param name="strType"></param>
private void SetPageView(pageType strType)
{
// Set all panel visible false
pnlList.Visible = false;
pnlCCExchg.Visible = false;
pnlChgSch.Visible = false;
pnlStaying.Visible = false;
pnlEnterTainment.Visible = false;
pnlMisc.Visible = false;
pnlSouvenir.Visible = false;
pnlTransportation.Visible = false;
pnlOverBudget.Visible = false;
pnlOverBudget.Visible = false;
pnlFAUse.Visible = false;
// Set all page button enable true
btnlist.Enabled = true;
btnChgSch.Enabled = true;
btnCCExchg.Enabled = true;
btnStaying.Enabled = true;
btnTransportation.Enabled = true;
btnMisc.Enabled = true;
btnSouvenir.Enabled = true;
btnEnterTainment.Enabled = true;
btnOverBudget.Enabled = true;
btnFAUse.Enabled = true; btnlist.Font.Bold = false;
btnlist.ForeColor = Color.Black;
btnChgSch.Font.Bold = false;
btnChgSch.ForeColor = Color.Black;
btnCCExchg.Font.Bold = false;
btnCCExchg.ForeColor = Color.Black;
btnTransportation.Font.Bold = false;
btnTransportation.ForeColor = Color.Black;
btnEnterTainment.Font.Bold = false;
btnEnterTainment.ForeColor = Color.Black;
btnFAUse.Font.Bold = false;
btnFAUse.ForeColor = Color.Black;
btnMisc.Font.Bold = false;
btnMisc.ForeColor = Color.Black;
btnOverBudget.Font.Bold = false;
btnOverBudget.ForeColor = Color.Black;
btnSouvenir.Font.Bold = false;
btnSouvenir.ForeColor = Color.Black;
btnStaying.Font.Bold = false;
btnStaying.ForeColor = Color.Black; // page type
switch(strType)
{
case pageType.List:
pnlList.Visible = true;
btnlist.Font.Bold = true;
btnlist.ForeColor = Color.Red;
break;
case pageType.ChgSch:
pnlChgSch.Visible = true;
btnChgSch.Font.Bold = true;
btnChgSch.ForeColor = Color.Red;
break;
case pageType.CCExchg:
pnlCCExchg.Visible = true;
btnCCExchg.Font.Bold = true;
btnCCExchg.ForeColor = Color.Red;
break;
case pageType.Transportation:
pnlTransportation.Visible = true;
btnTransportation.Font.Bold = true;
btnTransportation.ForeColor = Color.Red;
break;
case pageType.EnterTainment:
pnlEnterTainment.Visible = true;
btnEnterTainment.Font.Bold = true;
btnEnterTainment.ForeColor = Color.Red;
break;
case pageType.FAUse:
pnlFAUse.Visible = true;
btnFAUse.Font.Bold = true;
btnFAUse.ForeColor = Color.Red;
break;
case pageType.Misc:
pnlMisc.Visible = true;
btnMisc.Font.Bold = true;
btnMisc.ForeColor = Color.Red;
break;
case pageType.OverBudget:
pnlOverBudget.Visible = true;
btnOverBudget.Font.Bold = true;
btnOverBudget.ForeColor = Color.Red;
break;
case pageType.Souvenir:
pnlSouvenir.Visible = true;
btnSouvenir.Font.Bold = true;
btnSouvenir.ForeColor = Color.Red;
break;
case pageType.Staying:
pnlStaying.Visible = true;
btnStaying.Font.Bold = true;
btnStaying.ForeColor = Color.Red;
break;
default:break;
}
}
至于如何根据用户的选择打开不同的窗体,这个你也可以使用里面选项卡,点击按扭时就在选项卡之间相互切换,如果是窗体可能就hide()和show()了