473,406 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

showing Windows form from code module.

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

Nov 20 '05 #1
4 1566
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" <Ra********@hotmail.com> wrote in message
news:OU**************@tk2msftngp13.phx.gbl...
I have a code module with main as subroutine name.
How to launch a Windows form from here.
Thanks,
Ram

Nov 20 '05 #2
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" <Ra********@hotmail.com> wrote in message
news:OU**************@tk2msftngp13.phx.gbl...
I have a code module with main as subroutine name.
How to launch a Windows form from here.
Thanks,
Ram

Nov 20 '05 #3
Ram
THANKS

"Rob Windsor [MVP]" <rw******@NO.MORE.SPAM.bigfoot.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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" <Ra********@hotmail.com> wrote in message
news:OU**************@tk2msftngp13.phx.gbl...
I have a code module with main as subroutine name.
How to launch a Windows form from here.
Thanks,
Ram


Nov 20 '05 #4
Ram
THANKS

"Rob Windsor [MVP]" <rw******@NO.MORE.SPAM.bigfoot.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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" <Ra********@hotmail.com> wrote in message
news:OU**************@tk2msftngp13.phx.gbl...
I have a code module with main as subroutine name.
How to launch a Windows form from here.
Thanks,
Ram


Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Gerry Viator | last post by:
Hi all, Whats going on. Testing messagebox, text isn't showing up. Public Class Form1 Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code "
1
by: Gordon Sanderson | last post by:
I have been working with for two days on a database with no problems(changing forms and adding code to the forms and a module). Shut down last night was fine, with no errors generated. This...
1
by: Henry | last post by:
I was trying to work through the Lab 2 exercises in the Microsoft's Windows-Based Applications in Visual C#. While I am not showing any errors I am also not seeing the mainMenu object when I run...
4
by: Ram | last post by:
I have a code module with main as subroutine name. How to launch a Windows form from here. Thanks, Ram
17
by: Jon B | last post by:
Hi All! I have a ASP.NET 2.0 site that works on the Windows 2000 Server. However, when I tried to view this site on my local Windows XP machine, I get "Server Unavailable". If I switch the...
2
pablojoshua
by: pablojoshua | last post by:
Ok I have the current processes showing, but it shows the path of the process too. I just want the list to show the .exe or .dll name with the suffix. This is what I have so far (from microsoft) ...
6
by: painkiller | last post by:
language: vb.net environment: windows forms .net : v1.1 i am having a checkedlistbox control that display document category such as text, image, video, audio etc. these values are coming from...
7
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should...
2
by: koosh34 | last post by:
VS2005 VB.net 2.0 I have a form called options with a ListBox1 on it, to fill the list box from several events on the form I put the code to update the ListBox1 items into a sub in a separate code...
16
by: John | last post by:
I am looking for VBA code that will work with Access 2003 to enable dragging and dropping a file/folder name from Windows XP Explorer into an Access form's text box. This is a common functionality...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.