<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Deborah's Developer MindScape : Data, WinForms</title><link>http://msmvps.com/blogs/deborahk/archive/tags/Data/WinForms/default.aspx</link><description>Tags: Data, WinForms</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Setting a Form as a Startup Form with Visual Studio</title><link>http://msmvps.com/blogs/deborahk/archive/2010/12/15/setting-a-form-as-a-startup-form-with-visual-studio.aspx</link><pubDate>Wed, 15 Dec 2010 22:03:50 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1784427</guid><dc:creator>Deborah Kurata</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/deborahk/rsscomments.aspx?PostID=1784427</wfw:commentRss><comments>http://msmvps.com/blogs/deborahk/archive/2010/12/15/setting-a-form-as-a-startup-form-with-visual-studio.aspx#comments</comments><description>&lt;p&gt;The startup form is the first form that is launched when your application is executed. By default, a Windows Forms project creates a default form when the project is created. This form is set as the startup form.&lt;/p&gt;  &lt;p&gt;You can change the startup form to any form within your application following the steps below. In this example, the report form is set as the startup form for testing purposes.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;To Set a Form as a Startup Form:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;In C#:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Modify the Program.cs file as follows:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;static void Main()      &lt;br /&gt;{       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Application.EnableVisualStyles();       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Application.SetCompatibleTextRenderingDefault(false);       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Application.Run(new &lt;strong&gt;ReportWin&lt;/strong&gt;());       &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;In VB:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;1) Double-click on My Project under the project in Solution Explorer.&lt;/p&gt;  &lt;p&gt;2) Click the Application tab.&lt;/p&gt;  &lt;p&gt;3) Set the Startup form.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/deborahk.metablogapi/7288.image_5F00_thumb10_5F00_1A855966.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image_thumb10" border="0" alt="image_thumb10" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/deborahk.metablogapi/4477.image_5F00_thumb10_5F00_thumb_5F00_4485578E.png" width="493" height="303" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Use this technique any time you want to change the start up form for the application.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1784427" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/deborahk/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/CSharp/default.aspx">CSharp</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/Data/default.aspx">Data</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/WinForms/default.aspx">WinForms</category></item></channel></rss>