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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top