Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Has my application been started by hand?

Tags:

c#

.net

autostart

I am developing a Forms application that is either supposed to start on Windows boot (by registering a key in the registry) or by the actual user.

In case the user starts it by hand (i.e. clicking the executable file), I want the form to show up. In case Windows triggered the event, I want the application to be hidden (into the tray bar).

Is there a way to programmatically determine which of those cases occured?

like image 824
fjdumont Avatar asked Nov 27 '12 15:11

fjdumont


People also ask

How do you know if my application has been accepted?

First, check the job listing, as well as any emails or other contacts you've had with the hiring manager or employer. See if any of that correspondence includes information on when you can expect to hear back from the company. If they give you a date, be sure to wait until after that date to follow up.

How do you ask if application has been received?

Follow up at least one week after applying. Try to find the hiring manager's contact details and write a personalized follow-up email. Reiterate your interest in the position and say why you'd perform well in the job. After another week without response, call the company to check if they received your application.

How long does it usually take to hear back from a job application?

It typically takes one to two weeks to hear back after applying for a job. An employer may respond faster if the job is a high priority, or if they're a small and efficient organization. It can also occasionally take longer for an employer to respond to a job application or resume submission.

How long does it take for an online application to process?

The average length of time it takes to hear back is one to two weeks or around 10-14 days after you submit your application materials. In contrast, certain jobs, like those for government positions could take as long as six to eight weeks to hear back.


3 Answers

The easiest way to do that, that I can think about, is:

When you register to run in Windows boot, pass a parameter (some default parameter), in case when user will run it, parameter will be absent.

In this way you would be able, depending on presence or absence of a paremeter, to determine the startup option of your program.

like image 37
Tigran Avatar answered Oct 14 '22 08:10

Tigran


I would suggest adding a command line parameter, something like -minimized and pass that when starting it on boot.

See this thread if you are looking for how to read the arguments.

like image 85
emartel Avatar answered Oct 14 '22 08:10

emartel


You can start you application upon Windows startup with a certain parameter, while a user will start it without this parameter.

like image 30
Flot2011 Avatar answered Oct 14 '22 08:10

Flot2011