I make and run Windows form application in VS. Then I close the VS (not running win form application). But still my Windows form application was running.
Does this mean that Windows form Application runs under operating system ?
basically when you create a win form application in visual studio, the first time you run it, it creates an executable (.exe) file in its bin folder. so even though when you close visual studio it will keep running.
(but when you run it in debug mode, the moment you close the VS, your
win form application will also be closed)
but one thing any program or process that runs in your machine is managed by operating system, like allocating memory resources etc...
Hope this will help
I have to put this as an answer since I need to place some image -
Closing VS will close the application only when its being debugged and you have started the app using VS
Being debugged - (you see a Running on top left)
This is true for both - Current project or an external system
However, if you are debugging an application by Debug -> Attach to process.
Closing VS will not kill the applicaiton although you can debug it.
Related
We have one Desktop application build with .NET3.5 in VS 2008. It is deployed on Network location which is accessible across the firm. Shortcut is created on user's machine to start the application. Desktop is being build (compiled) in AnyCPU configuration as Some user using XP machine and some are using Windows 7. Whenever new build (dlls and exe) deployed on network location, user have to close the app and restart it to work properly
Problem
We are facing a issue whenever we deploy new build (dlls and EXE) of the application. On Windows 7 machine application is not starting if we close the current running instance. User has to restart the machine itself to get it work.
Any help or suggestion is appreciated.
There is limited info to go on but the first thing I would make sure of, is the application still running under the Processes tab in the task Manager?
Go to the task manager on the computer and check the running processes tab to see if this app is still running.
It could be that it doesn't shut itself down properly after the user quits the application.
If the program is still running in the background then Windows will require a restart before the new dll's are loaded.
it's the first time that i ask help here, but i really desperete.
I had developed a WPF Applicacation with VS2010 SP1 in c#.NET and SQLite database. It's really a stupit application with 5 windows. The main one, on startup opens few thread: one is needed to manage http connection on it, and 2 thread interacts with a hardware connected with a usb connector (i used a DLL written in C). The main window has 3 buttons and when i press one of them, a new window is displayed. Every single window has a close button that close the window. When i press a button a play a wav file stored in a folder (I used full path to play wav file).
The image for XP embbeded is made starting with tool PE and made with the right tool of microsoft.
The application is developed on a PC with XP SP3 with VS2010 SP1 on board. The application run on it is working perfectly: i can open and close window with any problem and stop.
On XP embedded, i installed .NET Framework 4 and the installer for using SQLite with framework4 (i did the same on my Pc).
If i run my application on XPe (Q7 ATOM E640T with 1 giga of RAM and 4 giga of internal HD SSD), after 8 time that i open and close a windows, the application stops to work and i got a out of memory exception. i monitored with task manager, and when i got the exception the system is using 1/3 of the all memory.
The connection with SQLite is opened at startup of the application and is still opened till the end of it.
With dependency walker I checked witch DLL are loaded on Pc and witch on XPe and i saw that sometime the dll were with different version, so i copied from the Pc the newst on XPe, but nothing went right.
I installed WindDBG on XPe, but it's not help me.
I read a lot of forums where WPF is "compatible" with XPe, so i did the application.
Any suggestion to resolve my problem?
Thanks
I have created a win form application in c# with sqlce. I followed the steps here http://erikej.blogspot.dk/2013/10/sql-server-compact-4-desktop-app-with.html making some tweaks along the way since I was using sqlce 3.5 .net and that blog was talking about 4.0 .net.
When I finished the application, I created a set up project and build it which gave me an msi and setup file.
Now when I run this set up on my own machine where I developed the applicaton, it works a charm.
I tried it on a friend's machine as well, it worked well, he had visual studio 2010 as well on his machine.
Now when I tried it on 2 other machines with VS, after installation, on launching the exe, it launches and immediately closes, I do not see anything although.
I know it launches as i look at processes from my task manager it shows it in there for like 3-4 seconds and its gone.
I tried using this Not able to run the .exe file created from c# where i wrapped the try and catch around all the code inside the root win form but no text file was created with any errors.
On doing some research, it says it could be because I am missing some dll's, how do i make sure all the dlls from the references would be copied into the project ? I set all dll's to true for copy local.
Is this something else and not related to dlls?
I really just want to be able to install the application on any machine without any problems.
Thank you for your time.
EDIT
I need to add that this was a project that involved using an XBox controller sending data to a wireless receiver that was hooked to a PC. I used the XNA framework to intercept these and display some form of output on the Win Forms.
When packing and installing/deploying an application that makes use of the XNA DLLs on another non developer machine, the XNA framework needs to be installed.
My solution was packing my application along with the xna installer and so the xna framework installs as a prerequisite and then my application installs and then it no longer crashes.
Thanks to mrlucmoring and Mark for their support and troubleshooting.
I have some console C# application, which is working on Windows CE environment. This application start the other main application.This part is working. But also it have to detect when/if main application crash and in this case restart main application. Is there any way to detect application crash by program?
Thanks, Slava.
I have found the solution, which is pretty match to my needs.I just put the application to \Windows\StartUp folder and that is it. After restart all applications in StartUp folder are coming up,including MyApp.
I have this console application that handles pretty much data, more specifically it manipulates large Bitmap objects.
When I launch the Console application through Visual Studio, everything works fine. If I launch it from another application through new Process(), the Console application runs into Out of memory exceptions (working with the same data that works well from Visual Studio), and some other GDI+ errors (but I am fairly sure these errors are the result of earlier out of memory exceptions).
I have checked that the Maximum working set of memory is the same when the Console application is run from Visual studio (vshost), and when it is run from another application.
So my question is: Why does this happen??
I can also mention that the Console application is multithreaded.