#include <stdlib.h>
#include <time.h>
#include "conio.h"
void main()
{
int year=0,month=0,day=0,hour=0,mintue=0,second=0
printf("Input the day you tell your trues:(Year-Mou-Day-Hour-Min-Sec,default for 0):\n")
scanf("%d-%d-%d-%d-%d-%d",&year,&month,&day,&hour,&mintue,&second)
system("cls")
time_t now,trues,toget
while(1)
{
struct tm truest = {second,mintue,hour,day,month-1,year-1900}
now = time(NULL)
trues=mktime(&truest)
printf("now is %s\n",ctime(&now))
printf("the day you tell your trues:%s\n",ctime(&trues))
toget = (now-trues)/3600/24
printf("判巧days together:%d\n",toget)
toget = (now-trues)/3600
printf("掘则键hours together:%d\n",toget)
toget = (now-trues)/60
printf("mintues together:%d\n",toget)
toget = (now-trues)
printf("seconds together:%d\n",toget)
_sleep(1000)
system("cls")
}
}
祝盯带你成功
'核掘Form1.Visible改为False,另外添加一个Timer,Interval设为1'以下代码直接复制到代码框就好
Private Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
Private Sub Form_Load()
MsgBox "你真的要打开这个文件?……", vbInformation, "TZW Computer SOHO"
MsgBox "不要再打开啦!" + String(2, Chr(13)) + "里面可能会有……那个东西的哦!", vbInformation, "TZW Computer SOHO"
MsgBox "你真的要千万想清楚才好啊……" + String(2, Chr(13)) + "不然的话兄谈……", vbCritical, "TZW Computer SOHO"
Form1.Hide
Timer1.Enabled = True
End Sub
Private Sub Form_Unload(Cancel As Integer)
MsgBox "先别走那么快,卖段广告羡氏碰再说嘛…………:" + String(2, Chr(13)) + "精品软件,尽在 TZW Computer SOHO!" + String(2, Chr(13)) + "谢谢捧场!谢谢捧场! ——TZW :)", vbInformation, "请等一下,就一下就好……"
End Sub
Private Sub Timer1_Timer()
Static abc As Integer
SetCursorPos Rnd * Screen.Width / Screen.TwipsPerPixelX, Rnd * Screen.Height / Screen.TwipsPerPixelY
abc = abc + 1
If abc = 500 Then MsgBox "我都说过不要打开的啦!" + String(2, Chr(13)) + "你又不相信~~~~~~~~~" + String(2, Chr(13)) + "你看现在就变成这个样子了!唉~~~~~~~~~~~", vbOKOnly, "TZW's Joke": Unload Form1
End Sub
程序员普遍都是无趣,对女朋友不会浪漫吗?好像事实就是这样的。程序员薪水高,但不会花钱,也咐册许最美的情书就是用你的钱去撩她,带她去看电影,吃可口的蛋白,带她去旅游,去东京和巴黎迹蠢,还有浪漫的土耳其
这样的女朋友肯定对你投怀送抱,毫无免疫力。女孩子都是感性的,爱浪漫,所以你就给他制造浪漫。时代不同了,情书传情真的成为过时的产物,除非你的情书精致,与众不同,也能打动她的心?。作为程序员可以一个页面,html+css+js+h5,可以制作动画,画出爱心姿简陪,然后穿插她美美的照片,各种特效渲染。如果有条件给她单独做个网站,用她的名字申请一个域名,把制作的网页用服务发布出去,然后给她发送一个链接,当她打开链接,也许就是满满的幸福!
希望以上能给你一些帮助!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)