The startup that I set in my project is not the same when I open the exe file of my project. Someone can help me? tnx

Dani AI

Generated

asked for details and made a quick note about how the app was being launched. Below are focused checks and a simple fallback that make the startup form deterministic when the form shown by the EXE does not match the project setting.

  • Confirm the project Startup object (Project Properties -> Application). If it is Sub Main then the code in that procedure controls which form is shown; if it is a Form, the Application Framework normally shows that form unless code overrides it.
  • Check My Project -> ApplicationEvents.vb for a MyApplication.Startup handler. That event can cancel startup or load a different form.
  • If the solution has multiple projects, verify the intended project is the startup project in Solution Explorer. Running from VS vs running a built binary from disk can be different if the wrong project is set.
  • Inspect form constructors, Load and Shown handlers for calls that hide the form and open another (splash, login, etc.). Add a quick debug message in each form constructor or Load to confirm which one runs.
  • Use Clean + Rebuild and verify the project's Compile/Output path so the binary matches current source.

If you want absolute control, add a minimal Sub Main and set it as the Startup object. Example:

Module Startup
    Sub Main()
        Application.Run(New MainForm)
    End Sub
End Module

Using Sub Main eliminates surprises from designer or ApplicationEvents overrides.

Can you show/tell your solution so others can see it?

Can you show/tell your solution so others can see it?

just build your project and then get the EXE file from the RELEASE folder of your project

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.