Windows应用程序在C#中的弹出窗口 [英] pop-ups in windows application in c#

查看:802
本文介绍了Windows应用程序在C#中的弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我想根据特定时间在我的gui应用程序中弹出窗口,例如如果数据库中的时间是下午2.00pm,则我的弹出窗口必须对我来说是帕帕斯(Parz)帮助

谢谢您,

hello, i want pop ups in my gui application based upon a particular time say for example if the time is 2.00pm in the database then my pop up form must apperar to me.Plz help

Thank You,

推荐答案

在您的应用程序中设置一个计时器,该计时器每秒或每分钟触发一次.发生滴答事件时,检查是否是您等待的时间,然后使用Form.Show或Form.ShowDialog显示弹出窗口.
Set up a timer in your application that fires every second, or minute. When the tick event occurs, check if it is the time time you are waiting for, and use Form.Show or Form.ShowDialog to display the pop up.


radix3写道:

timer1.Interval = dr [0] .ToString();

timer1.Interval = dr[0].ToString();


Interval如何成为String?

如果我说对了,那么您有一个存储在数据库中的时间.
那是什么问题呢?
当应用程序启动时,从数据库获取时间,计算差值并找到间隔.将计时器间隔设置为该时间.

如果这不是您要尝试的操作,请详细说明.

[原始格里夫]我看不出您的答案被否决的原因.我的5来弥补.干杯!


How can Interval be String??

If I am getting you right, you have a time stored in database.
So what''s the problem?
When the application starts, get the time from database, calculate the difference and find the interval. Set the Timer interval to that time.

If this is not what you are trying, please elaborate.

[Original Griff] I don''t see a reason why your answer is down-voted. My 5 to compensate it. Cheers!


原始格里夫先生,我尝试过ur概念及其工作原理,但事实是我想根据数据库中保存的特定时间设置计时器的interval属性,所以我尝试了添加一个小的数据库代码,然后

timer1.Interval = dr [0] .ToString();

其中dr是sqlDataReader类的变量,但是当我这样做时,会同时打开许多具有相同形式的实例,请帮助我,先生

谢谢...
Original Griff Sir i tried ur concept and its working but the thing is that i want to set the interval property of the timer based upon a particular time saved in the database so i tried to add a small database code and then

timer1.Interval = dr[0].ToString();

where dr is a variable of sqlDataReader class, but when i do this many instance of the same form are being opened at a same time please help me out sir

Thank you...


这篇关于Windows应用程序在C#中的弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆