Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want just 3 users can be simultaneous Run my software.
My Software is written in c#.
Any idea, how to do the same?
Write in log-file all starts and exits (user, start date, exit date). When program start - check starts count and exits count. Maybe you should define old starts without exit as with exit (connection error and program can't write to log about her exit etc.).
3 Users on Network , Users copy short cut from exe file from network on desktop and then run
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
Hello I have a console application and every time the user types something and enters it closes it and I dont really want that in my application since it needs multiple inputs. I've tried debugging and opening the file itself.
Is there a answer?
-HoverNot
A console application closes when it runs out of code to execute
You can halt until someone has pressed enter by asking for input:
Console.ReadLine()
If you want to force the program to keep waiting for input, you can use
while(true) {
Console.ReadLine()
}
Then the window won't close until you press ctrl-c or click the cross (or kill the process some other way)
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have an application developed in C # that sometimes is blocked, when it is blocked I have to restart it. I know if there is any way to detect if the application is frozen, close it and then restart.
Thank for all!
Since it could be a third party programm you want to restart:
You restart a process in C# like so:
Process[] procs;
procs = Process.GetProcessesByName("Name");
// Test to see if the process is not responding.
if (!procs[0].Responding)
{
procs[0].CloseMainWindow();
procs[0].WaitForExit();
procs[0].Start();
}
Otherwise please follow the hints provided in the comments.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I would like to make a console application in which if a certain user types "volume up" and presses the ENTER key then the system volume to go up.
Any ideas?
For creating a console application in c#:
How to: Create a C# Console Application
To read the input text from a console application: Console.ReadLine Method
To set the system volume programmatically: Paedow's question and answer
Having these links your job is quite easy now. :)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'd like to write an app in C# (Winforms) that tracks a users time spent on their PC and if they are on it for an hour then tell them to go and have a break.
If they lock the machine then the counter is to be reset, I've seen examples of uptime for the machine and for idle time but nothing for actual time spent working at their PC.
If I can get some pointers as to the best way to accomplish this it would be appreciated. i.e .dll to use or reference etc
You could try using GetLastInputInfo for the idle time and a SessionSwitchEventHandler for the workstation lock/unlock.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have developed a c# application that I wish to sell.You'll must be knowing that many people just reverse their system clock and keep using the software.How to prevent that
any ideas?
The easiest and most safe way would be to require access to the net to validate the time.
But access to the net is a strict requirement, especially for some scenarios of usage.
In alternative you could try to keep an encrypted file in which you store the last time your application was launched. If the system clock on the next launch of your application is earlier than your stored last launch something must be fishy.