title: How to call subform before main form for vb.net
body: <p>I need my application to run this sub form first before the main form appears.</p>
  
  <p>Below is my code to do that:
  Application.myapp</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;MySubMain&gt;true&lt;/MySubMain&gt;
    &lt;MainForm&gt;MainForm&lt;/MainForm&gt;
    &lt;SingleInstance&gt;false&lt;/SingleInstance&gt;
    &lt;ShutdownMode&gt;0&lt;/ShutdownMode&gt;
    &lt;EnableVisualStyles&gt;true&lt;/EnableVisualStyles&gt;
    &lt;AuthenticationMode&gt;0&lt;/AuthenticationMode&gt;
    &lt;SaveMySettingsOnExit&gt;true&lt;/SaveMySettingsOnExit&gt;
  &lt;/MyApplicationData&gt;
  </code></pre>
  
  <p>Program.vb(where my subform method is)
  Imports Licenseform</p>
  
  <pre><code>Module Program
      Public Sub Main()
  
          Application.EnableVisualStyles()
          Application.SetCompatibleTextRenderingDefault(False)
          Application.Run(New Licenseform.Licenseform)
  
      End Sub
  End Module
  </code></pre>
  
  <p>When i tried to build the application,i got the following error:
  <a href="https://i.stack.imgur.com/h56mv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h56mv.png" alt="enter image description here"></a></p>
  
  <p>However if i disable the sub form by setting the application file </p>
  
  <pre><code>&lt;mySubMain&gt;false&lt;/MySubMain&gt;
  </code></pre>
  
  <p>It builds successfully.
  Any idea what is wrong and how should i troubleshoot it?</p>