0

Hi, I am trying to make a windows forms application that starts using Sub Main instead of the Form1_Load event.

I have tried putting this in Public Class Form1

Public Shared Sub Main()
        MsgBox("ASdf")
    End Sub

and also tried putting this at the top of the programs code outside the class:

Public Module Main
    Public Sub Main()
        MsgBox("Asdf")
        Application.Run(New Form1())
    End Sub
End Module

I can only get them to run when I make the app a console app. Is there a way to run these things either without making it a console app, or without actually showing the console?

I want to make a simple server app, but I don't want the server socket's loop to interfere with the forms functions

thanks for any help

edit: I would just use C++ but sockets are much harder

Edited by VBNick: n/a

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by VBNick
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.