首页上一页 1 下一页尾页 2 条记录 1/1页
请帮忙看下这个代码是什么问题!!
发表在C#图书答疑
2015-06-30
是否精华
是
否
版块置顶:
是
否
下面这个代码是照着书本里写的查了好多次都看不出是什么问题,
提示是这个位置代码错误:ToolStripMenuItem 有四个位置。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void 加载子窗体 ToolStripMenuItem_Click(object sender,EventArgs e)
{
Form2 form2=new Form2();
form2.MdiParent=this;
form2.Show();
Form3 form3=new Form3();
form3.MdiParent=this;
form3.Show();
Form4 form4=new Form4();
form4.MdiParent=this;
form4.Show();
}
private void 水平平铺 ToolStripMenuItem_Click(object sender,EventArgs e)
{
LayoutMdi(MdiLayout.TileHorizontal);
}
private void 垂直平铺 ToolStripMenuItem_Click(object sender,EventArgs e)
{
LayoutMdi(MdiLayout.TileVertical);
}
private void 层叠平铺 ToolStripMenuItem_Click(object sender,EventArgs e)
{
LayoutMdi(MdiLayout.Cascade);
}
}
}
提示是这个位置代码错误:ToolStripMenuItem 有四个位置。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void 加载子窗体 ToolStripMenuItem_Click(object sender,EventArgs e)
{
Form2 form2=new Form2();
form2.MdiParent=this;
form2.Show();
Form3 form3=new Form3();
form3.MdiParent=this;
form3.Show();
Form4 form4=new Form4();
form4.MdiParent=this;
form4.Show();
}
private void 水平平铺 ToolStripMenuItem_Click(object sender,EventArgs e)
{
LayoutMdi(MdiLayout.TileHorizontal);
}
private void 垂直平铺 ToolStripMenuItem_Click(object sender,EventArgs e)
{
LayoutMdi(MdiLayout.TileVertical);
}
private void 层叠平铺 ToolStripMenuItem_Click(object sender,EventArgs e)
{
LayoutMdi(MdiLayout.Cascade);
}
}
}