showing Windows form from code module.

  • Thread starter Thread starter Ram
  • Start date Start date
R

Ram

I have a code module with main as subroutine name.
How to launch a Windows form from here.
Thanks,
Ram
 
Here's the code you need. In .NET you need to use Application.Run to ensure
the form stays alive after the Sub Main completes

Public Sub Main()
Dim frm as New Form1()
Application.Run(frm)
End Sub
 
THANKS

Rob Windsor said:
Here's the code you need. In .NET you need to use Application.Run to ensure
the form stays alive after the Sub Main completes

Public Sub Main()
Dim frm as New Form1()
Application.Run(frm)
End Sub

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada


Ram said:
I have a code module with main as subroutine name.
How to launch a Windows form from here.
Thanks,
Ram
 
Back
Top