在PC启动时打印文档...一天一次 [英] Print the document on startup of PC...Once in a day

查看:81
本文介绍了在PC启动时打印文档...一天一次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一个VB.NET Windows应用程序,它在PC启动时运行....它包含一个函数PRINTDATES(),该函数可打印一个Word文档,现在我要做的是,我的应用程序必须打印该文档在一个动静的一天首次启动PC时...如果我重新启动PC,则它不应打印文档.... VB.NET中是否有用于此类打印的功能???或如果有任何可用的代码,则建议我....

I have made one VB.NET windows application, it runs on startup of PC....it contains one function PRINTDATES() which prints one word document, now what i want to do is, my appliction must print the document on first startup of PC in one perticulre day...if I restart my PC, then it should not print the document....is there any function availabe in VB.NET for this type of printing??? or If any code is available then suggest me....

推荐答案

.NET Framework中没有这样的魔术函数.您必须自己编写魔术".

您要做的就是在打印文档时将带有当前日期的值写入注册表.应用启动时,只需将当前日期与注册表中存储的日期进行比较即可.如果日期匹配,则说明您已经打印了文档.如果不是这样,那应该很明显.
There is no magic function like this in the .NET Framework. You have to write the "magic" yourself.

ALl you have to do is write a value to the registry with the current date when you print the document. When your app starts, all it has to do is compare the current date to the one stored in the registry. If the dates match, you''ve already printed document. If not, well, that should be obvious.


请参阅
See this[^] discussion on MSDN for a possible solution.


这篇关于在PC启动时打印文档...一天一次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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