已经写好一个Windows Form Application,程序通过GUI让用户设定一些参数,然后执
行。现在需要实现定时自动执行这个程序的功能。需要的参数会事先设定好。
我在考虑写个简单的scheduler Windows Service,来定时查看是否该执行程序。因为
不想重写已有的功能,所以希望如果可能,直接把事先设好多参数,通过command line
pass给这个GUI程序,请问可能这样作吗?
b****u 发帖数: 1027
2
yes, you can do that. just make sure your form respect the argument from
command line.
using following line to get list of command like arguments.
System.Environment.GetCommandLineArgs();