winform的问题 用show打开一个窗口的同时如何关闭前一个窗口 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 starlogin lg = new starlogin(); lg.Hide(); starindex st = new starindex(); st.Show();不行啊 写在starlogin里面的 怎么会不行 你是webform还是winform如果是winform: this.Hide(); starindex st = new starindex(); st.Show();webform:<a href="javascript:window.opener='null';window.close();" style="color: black">关闭窗口</a> 可以了 就是 starform 中的 MessageBox.Show(this, "您的帐号不正确!", "错误提示");在提示的时候显示在starform的中间?????????? 在那里设置????????? 例如前一个窗口是FORM1后一个是FORM2FORM2 fr2 = new FORM2();fr2.show();FORM1.ActiveForm.Close(); 这个可以了我 就是说在用FORM2 fr2 = new FORM2();fr2.show();打开form2的时候如何设置他在桌面的显示位置?????????? 明白否?谢谢 写一个继承 ApplicationContext 的类 像这样就解决关闭启动窗体的问题了 static class Program { public class MyApplicationContext : ApplicationContext { public MyApplicationContext() { frmSystemLogin frmStart = new frmSystemLogin(); frmStart.Show(); } private void OnApplicationExit(object sender, EventArgs e) { } private void OnFormClosing(object sender, EventArgs e) { } private void OnFormClosed(object sender, EventArgs e) { } } /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] static void Main() { Application.Run(new MyApplicationContext()); } } 登陆窗口的StartPosition设为CenterScreen 把窗体的StartPostition属性设置为CenterScreen就可以了 如果不在设计界面将属性StartPosition设置成CenterScreen的话,也可以在登陆窗体中的Actived事件中设置 泛型类引用有参数的构造函数方法,请大家帮忙对比。 在c#类中如何引用窗体控件 winform:求ftp上传 与 下载小例子, ##################要学习API 提前需要学点什么############## 大家帮我看一下源码,分析一下结果!!! column1.format="n" 后,无法输入负数了?想想都不可能啊? “蜀中无人?”,可悲,一个问题我问了好几天,竟还没人帮忙 如何读出数值型数据然后写入 问一个关于正则表达式的例子 DataGrid能导出pdf文件吗? 怎样右键切换显项卡 相对路径的问题
lg.Hide();
starindex st = new starindex();
st.Show();
不行啊
写在starlogin里面的
this.Hide();
starindex st = new starindex();
st.Show();
webform:
<a href="javascript:window.opener='null';window.close();" style="color: black">关闭窗口</a>
就是
starform 中的 MessageBox.Show(this, "您的帐号不正确!", "错误提示");
在提示的时候显示在starform的中间??????????
在那里设置?????????
FORM2 fr2 = new FORM2();
fr2.show();
FORM1.ActiveForm.Close();
就是说在用
FORM2 fr2 = new FORM2();
fr2.show();
打开form2的时候如何设置他在桌面的显示位置??????????
明白否?
谢谢
static class Program
{
public class MyApplicationContext : ApplicationContext
{
public MyApplicationContext()
{
frmSystemLogin frmStart = new frmSystemLogin();
frmStart.Show();
}
private void OnApplicationExit(object sender, EventArgs e)
{
}
private void OnFormClosing(object sender, EventArgs e)
{
}
private void OnFormClosed(object sender, EventArgs e)
{
}
} /// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new MyApplicationContext());
}
}