Hello! How do I create a .config file? Also when my application loads say there is a value like startup=1 in there, If the startup=1 then it loads Form1 if startup=2 then it loads Form2. How do I do this?
Printable View
Hello! How do I create a .config file? Also when my application loads say there is a value like startup=1 in there, If the startup=1 then it loads Form1 if startup=2 then it loads Form2. How do I do this?
You add a config file as an item in the solution explorer. You read the config file using the members of the System.Configuration namespace. You would read the relevant value in a Main method and then pass a new instance of the appropriate type of form to Application.Run. I suggest that you read up about the Configuration namespace.