VS2008窗体跳转问题
在下刚学C#,用VS2008写一个项目时,窗体之间需要跳转,但我实现不了,错误是:“非静态的字段、方法或属性“System.Windows.Forms.Control.Show()”要求对象引用”,错误的地方已在代码里注明。using System;
using System.Collections.Generic;
using
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Fruits
{
public partial class frmXuanze : Form
{
public frmXuanze()
{
InitializeComponent();
}
private void btnGly_Click(object sender, EventArgs e)
{
if (TextInput())
{
frmDelu frmdelu = new frmDelu();
frmDelu.Show(); //错误在此处
this.Visible = false;
}
}
private bool TextInput()
{
return true;
}
private void btnTuichu_Click(object sender, EventArgs e)
{
Application.Exit();
}
}
}