|
-
September 30th, 2005, 10:45 AM
#1
Run WIN.FORM application containing UI when user is logged off problem??
I am puzzled with one task. Need some advice please. I have an application that is intended to be used
both by user and scheduled as cron job under Windows Scheduler. The problem is that it has UI like progress bar and some messaging windows, I need it because when user runs , he should see what is going on. However when application runs under Windows Schedule in situation when user is logged of, obviously it can not create UI handles and it crashes. I do not want to create 2 separate application one with UI and other without. I was just wondering if there is any way I can test form the program whether User Controls or Windows can be created or not and take appropriate action without program crashing.
Thanks for any valuable advice.
"We act as though comfort and luxury were the chief requirements of
life, when all that we need to make us happy is something to be
enthusiastic about."
- Einstein
-
September 30th, 2005, 10:52 AM
#2
Re: Run WIN.FORM application containing UI when user is logged off problem??
I figured you can just output some dumy form in try catch block and in catch blog set UIFlag to flase and test it in application when UI is used.
I was just wondering if there are more intelegent way of handaling it ?
"We act as though comfort and luxury were the chief requirements of
life, when all that we need to make us happy is something to be
enthusiastic about."
- Einstein
-
September 30th, 2005, 11:17 AM
#3
Re: Run WIN.FORM application containing UI when user is logged off problem??
 Originally Posted by stardv
I figured you can just output some dumy form in try catch block and in catch blog set UIFlag to flase and test it in application when UI is used.
I was just wondering if there are more intelegent way of handaling it ?
Well there can be a way to know whether the application needs to be started with GUI or not. A command Line switch can do this. If you don't want UI when the application launches from Task Scheduler then pass a command line switch as "-noUI". Something similar to this should work.
PS: There was a thread on this subject sometime back, but i don't remember whether it was in VB.NET or C#. If you do a search you might find it.
-
September 30th, 2005, 11:58 AM
#4
Re: Run WIN.FORM application containing UI when user is logged off problem??
Thanks. Sounds like a good idea, how I did not think of this
I do remember reading a thread on that topic a while aog but I can not find it. If you come acrros, please refre me to it
Thanks again
"We act as though comfort and luxury were the chief requirements of
life, when all that we need to make us happy is something to be
enthusiastic about."
- Einstein
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|