I assume you're using Windows Forms since you said "I tried to hide it on startup, Me.Hide
. Didn't work out, tho."
It's pretty simple, actually. Don't show the form until you want to.
To do this, I'd disable the Enable Application Framework
option in the project properties. (See https://msdn.microsoft.com/en-us/library/tzdks800.aspx, the option I mentioned is there somewhere.).
Then, create a new class (or you can use a module) in your project and name it "Program". The name isn't really important, but by convention it's usually "Program".
Create the famous "Main" procedure within this class. There are a few available signatures for this function.
- The simplest is as simple as:
Public Shared Sub Main()
- Alternatively, you can receive command line arguments:
Public Shared Sub Main(ByVal args() As String)
- Repeat 1, but as a function returning a 32-bit signed-integer.
- Repeat 2, but as a function returning a 32-bit signed-integer.
The point of returning an integer on the end of the 'Main' functions is to return an exit code specifying if everything went "OK". You generally return 0 if everything worked and an error-code or something to specify an error occurred.
Set the project's "Startup Object" to your new class.
Finally, if you ever want to show a form simply instantiate an object whose type is your form and show it.
Dim form As New Form1()
form.Show()
And as always, dispose the form when you're done with it.