0

How is best/fastest change the appearance of all windows application in C # using the parameter during the run? Let's assume that application has 30 forms.

Program.exe-N (all windows / forms will be run as a parameter WindowState Normal) or Program.exe-M (all windows / forms will be run as a parameter WindowState Maximized)

PsR
  • 13
  • 2
  • 9

1 Answers1

0

Modify the Program.Main() method to be Program.Main(string[] args) then you can pick up all variables attached to its launch and do with them what you require

More .NET C# main method and windows forms

Community
  • 1
  • 1
Colin Steel
  • 1,045
  • 1
  • 11
  • 24
  • but it takes the form of setting on each window depending on the parameter. I care to set it somehow globally – PsR Feb 05 '14 at 11:15
  • To set it globally, you will have to set it individually on each form, which will require catching the parameter, storing it for all forms to access and setting the property on each constructor - not so good. If your application structure allows it, make a new form, which inherits from `Form` and code this behaviour there, and make all of your forms inherit from your new form. – Colin Steel Feb 05 '14 at 11:20
  • unfortunately forms are not inherited from the main form. It remains only to set the look of the forms on EVERY form? – PsR Feb 05 '14 at 11:25
  • What do you mean 'Main' form, I'm talking the .NET superclass for forms, not the Main form of your application. – Colin Steel Feb 05 '14 at 11:27