This question already has answers here:
How to run a .NET console application in the background
(8 answers)
Single Form Hide on Startup
(23 answers)
Closed 7 years ago.
I needed to make an application that doesn’t show any window.
I couldn't find the answer Also I looked at stack overflow pages.
Does your application require a user interface? If not, you should really be creating a console application rather than a Windows Forms or WPF Application.
If you simply want to hide a form from within the form you can type the following:
this.Hide();
Edit:
From a console application, you'll want to compile the project as a Windows Forms application under the project properties. Ensure that you have no startup object selected.
Related
This question already has answers here:
Implement a menu on tray icon for .NET 5/6 win forms
(2 answers)
How can I make a .NET Windows Forms application that only runs in the System Tray?
(13 answers)
Closed 5 days ago.
I'm struggling to figure out where / how to get started creating a program which runs in the Windows system tray only, and has a right-click feature to display a menu which contains only shortcuts. Examples of shortcuts would be "Send an email to help#example.com" "Take a screenshot"
This question already has answers here:
How can I navigate between forms
(3 answers)
Closed 8 years ago.
So, I'm new to Visual Studio and I'm trying to make a simple multi-page WinForms program in Visual C#. How do I change the "page" that the program is displaying like a normal program does? So far the best I can do is close/hide one Form and open another in its place.
WinForms doesn't have a notion of "pages". That mechanism was made popular later on the windows client, with WPF. One could argue that WinForms apps are more normal than the rest. ;)
One thing you could do to simulate it, would be to make your "pages" in UserControls, and then add/remove them from the form dynamically.
This question already has answers here:
Splash Screen waiting until thread finishes
(5 answers)
Closed 9 years ago.
In browsing MSDN I saw that one could easily create a Splash-screen by importing an image file & setting the Build Action to 'Splash Screen'.
Is this only for a WPF or can I do the same for a Windows Form application?
No you can not do it for a Windows Form the same way that you did in WPF.
How to build splash screen in windows forms application?
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Close Button on VS11 Apps
How can a Windows Store app close itself in code (C# but JS could be helpful too)?
Comment reposted as answer:
Duplicate of this question: Close Button on VS11 Apps
The short of it: you shouldn't have a close button if you are actually making a Windows Store app (it won't be certified), but you can use Application.Current.Close() if you need a button for debug close.
This question already has answers here:
WPF control in windows forms?
(2 answers)
Closed 7 years ago.
I made some custom controls in Expression Blend 4 using WPF. However, I need to use them in a Windows Forms application. Is this possible or am I out of luck?
You should be able to do:Hosting WPF Content in a Microsoft Win32 Window
See also: How do I host a WPF control in a Windows Forms application?