触发动作 [英] Triggering an Action

查看:99
本文介绍了触发动作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个程序,该程序可以由用户手动运行,也可以在预定时间运行.

在表单的负载中,


FromTimeScheduled()-程序在计划任务上运行时进行初始化的过程.

Manuallyloaded()-用户运行程序时初始化的过程.

程序运行时,如何从Form的Load中调用两者之一.

I created a program that can be run(load) manually by a user, or at time scheduled instance.

In the Form''s Load,


FromTimeScheduled() - Procedure to initialize when the program runs on Scheduled Task.

Manuallyloaded() - Procedure to initialize when User runs the Program.

How can i call either of the 2 from the Form''s Load when the program runs.
How will identify if the program was run via Scheduled Task or by the User Clicking the icon program at his DeskTop?

推荐答案

您可以执行此操作.

请配置您的程序以使用parameter.我不确定,但是我认为它在项目属性菜单中

然后在表单加载中检查参数值.

可以说,如果您正在调度程序中执行该程序,则确实将参数值传递为"FromSchedular",并且如果用户运行该程序,那么它肯定会是一个空值.
You can do this .

Please configure your programme to use parameter . I am not sure but I think it is in project property menu

and then in form load check the parameter value.

Lets say if you are executing that program from scheduler do pass the parameter value as "FromSchedular" and if user run the program then it defiantly an empty value.


这篇关于触发动作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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