showdialog问题 程序运行时托盘,当计时器到时,显示一个新个窗体,可是窗体显示出不出来? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 程序运行时,就像QQ一样,显示在右下角任务栏上,当到一定的时间时,显示一个窗体,用showdialog()来显示的,可是显示不出啊? private void timer1_Tick(object sender, System.EventArgs e) { this.timer1.Stop(); Form2 thisFrm=new Form2(); thisFrm.ShowDialog(); this.timer1.Start(); } private void Form1_Load(object sender, System.EventArgs e) { this.timer1.Interval=60000 //1分钟 this.timer1.Start(); } using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;namespace WindowsApplication1{ /// <summary> /// Form1 的摘要说明。 /// </summary> public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.Timer timer1; private System.Windows.Forms.NotifyIcon notifyIcon1; private System.ComponentModel.IContainer components; public Form1() { // // Windows 窗体设计器支持所必需的 // InitializeComponent(); // // TODO: 在 InitializeComponent 调用后添加任何构造函数代码 // } /// <summary> /// 清理所有正在使用的资源。 /// </summary> protected override void Dispose( bool disposing ) { if( disposing ) { if (components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Windows 窗体设计器生成的代码 /// <summary> /// 设计器支持所需的方法 - 不要使用代码编辑器修改 /// 此方法的内容。 /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1)); this.timer1 = new System.Windows.Forms.Timer(this.components); this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components); // // timer1 // this.timer1.Interval = 60000; this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // // notifyIcon1 // this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon"))); this.notifyIcon1.Text = "notifyIcon1"; this.notifyIcon1.Visible = true; // // Form1 // this.AutoScaleBaseSize = new System.Drawing.Size(6, 14); this.ClientSize = new System.Drawing.Size(292, 266); this.Name = "Form1"; this.ShowInTaskbar = false; this.Text = "Form1"; this.WindowState = System.Windows.Forms.FormWindowState.Minimized; this.Load += new System.EventHandler(this.Form1_Load); } #endregion /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] static void Main() { Application.Run(new Form1()); } private void timer1_Tick(object sender, System.EventArgs e) { this.timer1.Stop(); Form2 thisFrm=new Form2(); thisFrm.ShowDialog(); this.timer1.Start(); } private void Form1_Load(object sender, System.EventArgs e) { this.timer1.Interval=60000; //1分钟 this.timer1.Start(); } }} Access数据库的问题 关于CS结构的系统 c# 怎么获得任务栏所有窗体句柄??? 求排序的高效率算法 [快速结贴]如何给webservice传递QueryString参数?webservice应该如何设计此方法? 简单的两张表,要求写出 SQL 语句,解决就送120分,时间紧迫!! 如何通過C#鏈接DB文件?已下載SQL Anywhere 5.0 Sample 如何添加文本编辑器上的行号 一个关于datagrid控件的小问题! 请帮我一下,一个windows form的例子,可是编译时出错。 关于在VS2005中将数据源拖到窗体上的问题 怎么停掉一个webservice???
{
this.timer1.Stop();
Form2 thisFrm=new Form2();
thisFrm.ShowDialog();
this.timer1.Start();
} private void Form1_Load(object sender, System.EventArgs e)
{
this.timer1.Interval=60000 //1分钟
this.timer1.Start();
}
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;namespace WindowsApplication1
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.NotifyIcon notifyIcon1;
private System.ComponentModel.IContainer components; public Form1()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent(); //
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
} /// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
} #region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
//
// timer1
//
this.timer1.Interval = 60000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// notifyIcon1
//
this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon")));
this.notifyIcon1.Text = "notifyIcon1";
this.notifyIcon1.Visible = true;
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(292, 266);
this.Name = "Form1";
this.ShowInTaskbar = false;
this.Text = "Form1";
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
this.Load += new System.EventHandler(this.Form1_Load); }
#endregion /// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
} private void timer1_Tick(object sender, System.EventArgs e)
{
this.timer1.Stop();
Form2 thisFrm=new Form2();
thisFrm.ShowDialog();
this.timer1.Start();
} private void Form1_Load(object sender, System.EventArgs e)
{
this.timer1.Interval=60000; //1分钟
this.timer1.Start();
}
}
}