473,322 Members | 1,526 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,322 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 1561
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.