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 8 years ago.
Improve this question
I have a question regarding problem i am solving. I am editing an old Winform app; currently the only part I need does not take input from the user(automated program). However the form contains database connection settings that program uses. Currently the program needs the user to press a button to start the process (code is associated with the button). Do i need to convert whole app to Console App or is there an easier way to automate this process without messing with the database connection settings.
Right now, you have a WinForm that runs code on a button press. You need to turn this into a "headless" or automatic process. Here is what I think based on your description would be the best things to do:
Remove the button, and have the code that was being ran by the button be called by a more "automatic" process, such as "Form_Load" or a timer.
Take the code and move it into a console app. As long as you don't ask for user input within the logic, it will run and close itself when it's done.
However, this is just some broad and generic suggestions. You need to look at your code and decide for yourself what to do.
Related
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 5 years ago.
Improve this question
I am working on folder/file lock program. Lets say my program knows which folders/files were locked, I want my program to launch (wpf window opens and asks for password) when user wants to access locked folder/file ( I want this possibility only on locked folders). Is there a way to do this?
Well. There is several ways. You could write a service that starts a program when locked folders are clicked. You could probably also write a program, that runs in the processline and are hidden normally. But pops up when a locked folder is clicked.
The big question is, why would you want to do that? Sounds like you're trying to write malware.
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 6 years ago.
Improve this question
How can i start an app when user logs on first time on a machine? I need to write an app which assists the user for example configuring other software, printer etc. What i need to ensure is, that this app starts when a user first logs into this machine.
How can I achieve this?
(If it helps, I only need to support Windows 10.)
Make an auxiliar process that starts your app when the computer starts. You can refer this one...
How to run a C# application at Windows startup?
then make a value at your db, for example firstLogin and changed to 0 for this user when your app is running.
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 6 years ago.
Improve this question
I've created a simple application in C# which purpose is to have a Windows Service running on Background in the whole time the computer is alive and which I know is a non-GUI process.
I want the Service to execute some command like, programmatically lock the computer, send data to one of my Windows Form Application, show Windows Form Application etc. which will not work because it is Windows Service. I found it really hard for me to work with this.
Now, my question is, is there any alternative way for what I want to achieve?
I mean other solution for running background process in the whole time and do the GUI job?
I am really out of ideas, anyone can suggest/help will be very appreciated!
You can always write a winforms application that will run a background thread listening for commands and executing tasks. Then all you need to do is register this executable to be started when a session is started. The application could be minimized to the tray so that the user could still manipulate it.
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 6 years ago.
Improve this question
I'm new to C#.
I am thinking as a little practice project in Visual Studio i am going to make a little application that launches a game (Counter Strike: Global Offensive) when you click a button.
Just a couple of Points:
Is this a bit too much as a first project?
Would i need it so when you click the button it would just have to
look for the launch.exe for that game?
Is this a bit too much as a first project?
Not at all. It is pretty much starting application with some command line parameters.
Would i need it so when you click the button it would just have to
look for the launch.exe for that game?
Steam games are launched by steam:// uri scheme which maps to steam.exe executable. So you pretty much need to start steam.exe process passing uri like steam://rungameid/game_id where game_id is numerical id of that game.
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'll simplify the situation to get rid of confusion.
I want to make a program that only has 1 button in the program. Upon clicking the button, the program will simulate a generic gamepad button. I'm sure when the program starts, it will have to somehow emulate a gamepad. The gamepad that is being emulated should be visible in the Control Panel. (joy.cpl to be more specific)
I have to do this without making a driver or relying on a 3rd party library/API- I know it can be done this way since I've seen some programs that actually do this already but my program will have a completely different use than those. I cannot find any good information on where to start, so pushing me in the right direction would be nice or showing me some code in C# would be cool, too!
Thanks, guys!