Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Windows; // Application, StartupEventArgs, WindowState
- namespace SDKSample
- {
- public partial class App : Application
- {
- void App_Startup(object sender, StartupEventArgs e)
- {
- // Application is running
- // Process command line args
- bool startMinimized = false;
- for (int i = 0; i != e.Args.Length; ++i)
- {
- if (e.Args[i] == "/StartMinimized")
- {
- startMinimized = true;
- }
- }
- // Create main application window, starting minimized if specified
- MainWindow mainWindow = new MainWindow();
- if (startMinimized)
- {
- mainWindow.WindowState = WindowState.Minimized;
- }
- mainWindow.Show();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement