求一个C#新年倒计时的程序
求一个C#新年倒计时的程序
还倒计时啊,我天天都是过新年啊
time_t t = time(0);
char tmp[64];
strftime( tmp, sizeof(tmp), "%Y/%m/%d %X %A 本年第%j天 %z",localtime(&t) );
puts( tmp );
return 0;
用什么写啊!
用Form形式还是 控制台??
楼主的意思是打包成exe给他。。。。。。。
;-)
这个问题比较简单吧!
用winform给你写一个。。。
C# code:
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 WindowsFormsApplication2
{
public partial class Form1 : Form
{
DateTime dt = new DateTime(2010, 01, 01, 00, 00, 00);
public Form1()
{
InitializeComponent();
this.label1.Text = "距离新年还有: ";
this.timer1.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
DateTime dateNow = System.DateTime.Now;
TimeSpan dm= dt - dateNow;//间隔天数
string str = dm.ToString();
string [] array = str.Split(new char []{'.',':'});
label2.Text =array [0]+"天 "
相关问答:
最近在做个网上商城,购物车模块,没有做过,麻烦各位帮忙说下大致说下思路,能发一份源码更好。小弟先谢过各位了;
QQ:413763818;
eamil:swebook@126.com
网上一大堆!
www.51aspx.com
去下 ......
在数据库中有张表,有id,name两列,id 是主键,没有设置自增属性,在程序中取出这张表放入datatable,在这个datatable中插入一条记录,当更新数据库时提示id列不能为空,请问该怎么解决?
给它一个值!!主键不能为空 ......
txt 和XML 格式相应
不借助DataSet
导入读取TXT文件
然后直接写入XML(同一文件,不同数据,递增原数据没有被覆盖情况下增加数据.)
教个要点或最好是有个代码提示的
过路好汉 帮个忙撒^^
不会,帮楼主 ......
DataSet导出xml 批处理(循环)得怎么处理
XML文件
<A>
<B>
<C>
</C>
&nb ......