Hello Techies,
In my vb.net project i have two forms names are emp and admin. Even i set startup form as emp it always load admin.Kindly help me to solve this problem.
Thanks and Regards Alagar [email protected]
Hello Techies,
In my vb.net project i have two forms names are emp and admin. Even i set startup form as emp it always load admin.Kindly help me to solve this problem.
Thanks and Regards Alagar [email protected]
Go Solutions Explorer. Click on your project. Go to project properties. Look for Startup Form. Click admin.
Make sure when you build your project, you're not having any compile/build errors. If you are, it will ask if you want to run the last successful build. Never answer "Yes" to that question. Instead, solve your compile errors and run it again.
EDIT: If you've tried it thru setting the startup form and there are no compile errors, then as a last resort, you can try the brute-force method.
Public Sub Startup() admin.Show() End Sub
You'll see whatever form you want in the code. This is fool-proof.
If the code in the form emp accesses anything in the admin form (class), it will cause the admin form to be loaded.
From project properties, select the startup form. And if it doesn't work, find "application.designer.vb" file.
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.AssemblyExample.<<form name >>
End Sub
<<form name>>
is the one which you want to set as a startup.