为什么不弹框。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} DateTime nineTime = DateTime.Parse("2010-12-30 17:30:00");
private void timer1_Tick(object sender, EventArgs e)
{
if (DateTime.Now.TimeOfDay.CompareTo(nineTime.TimeOfDay) == 0)
{
ShowMessage();
}
} private void ShowMessage()
{
MessageBox.Show("下班了!");
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} DateTime nineTime = DateTime.Parse("2010-12-30 17:30:00");
private void timer1_Tick(object sender, EventArgs e)
{
if (DateTime.Now.TimeOfDay.CompareTo(nineTime.TimeOfDay) == 0)
{
ShowMessage();
}
} private void ShowMessage()
{
MessageBox.Show("下班了!");
}
}
}
解决方案 »
- 请教一个关于表达式的问题
- 试图吊销一个未注册的拖放目标 (异常来自 HRESULT:0x80040100 (DRAGDROP_E_NOTREGISTERED))
- 单项选择,checkbox..............
- 上传图片的问题 最好有源代码
- 谁知道这句话是什么意思
- MonthCalendar的变色问题。。
- DataSet当前行某列值有办法取吗?
- 如何用webbrowser调用网页
- 笨人正在学做Controls,down了一个源代码。其中一段不明白。会做自定义控件的请进(windows)
- 一个绑定了数据的DataGridView表格,如何在悬停事件中获取表格数据
- 如何项设置单击menuStrip菜单项目状态
- C# winfrom程序图片按钮菜单问题
if (DateTime.Now.Subtract(nineTime).Second>0)
{
ShowMessage();
}
{
InitializeComponent();
timer1.Start();
}