473,566 Members | 2,785 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

vb.net 2003 module sub main()

Hi ther
I have a small vb.net 2003 program with 5 forms: form1, form2, et
I have a module in the program from where I want to launch form1 - the main for
In the module I have a bunch of public declarations like
Public carstuf
Public yardstuf
and so o
At the end of the modul
I have a sub mai
The module looks like this
=============== ===
Module myMo
Public carstuf
Public yardstuf
and mor
-----------------
Sub Main(

Can someone please tell what statement I can put in here to load and show form1

End Su
End Modul
=============== ============
I tried all of the vb6 ways to do this that I know and nothing work
Please...
Thank

Nov 20 '05 #1
8 2409
Dim frm as new Form1
frm.show

in Sub Main() should do it.

"kyle" <an*******@disc ussions.microso ft.com> wrote in message
news:45******** *************** ***********@mic rosoft.com...
Hi there
I have a small vb.net 2003 program with 5 forms: form1, form2, etc
I have a module in the program from where I want to launch form1 - the main form In the module I have a bunch of public declarations like:
Public carstuff
Public yardstuff
and so on
At the end of the module
I have a sub main
The module looks like this:
=============== ====
Module myMod
Public carstuff
Public yardstuff
and more
------------------
Sub Main()

Can someone please tell what statement I can put in here to load and show form1?
End Sub
End Module
=============== =============
I tried all of the vb6 ways to do this that I know and nothing works
Please....
Thanks

Nov 20 '05 #2
Dim frm as new Form1
frm.show

in Sub Main() should do it.

"kyle" <an*******@disc ussions.microso ft.com> wrote in message
news:45******** *************** ***********@mic rosoft.com...
Hi there
I have a small vb.net 2003 program with 5 forms: form1, form2, etc
I have a module in the program from where I want to launch form1 - the main form In the module I have a bunch of public declarations like:
Public carstuff
Public yardstuff
and so on
At the end of the module
I have a sub main
The module looks like this:
=============== ====
Module myMod
Public carstuff
Public yardstuff
and more
------------------
Sub Main()

Can someone please tell what statement I can put in here to load and show form1?
End Sub
End Module
=============== =============
I tried all of the vb6 ways to do this that I know and nothing works
Please....
Thanks

Nov 20 '05 #3
I finally found this in vb.net2003's help file
=============== =============== ===
Module Hell
' A "Hello World!" program in Visual Basic

Sub Main(
'MsgBox("Hello World!") ' Display message on computer screen
' Instantiate a new instance of Form1
Dim f1 As New Form
' Display a messagebox. This shows the application is running,
' yet there is nothing shown to the user. This is the point at
' which you customize your form
System.Windows. Forms.MessageBo x.Show("The application is running now, but no forms have been shown."
' Customize the form
f1.Text = "Running Form
' Show the instance of the form modally
f1.ShowDialog(
End Su
End Modul
=============== =============== =============== ====
Thank

----- Michael Horton wrote: ----

Dim frm as new Form
frm.sho

in Sub Main() should do it

"kyle" <an*******@disc ussions.microso ft.com> wrote in messag
news:45******** *************** ***********@mic rosoft.com..
Hi ther
I have a small vb.net 2003 program with 5 forms: form1, form2, et
I have a module in the program from where I want to launch form1 - th main for In the module I have a bunch of public declarations like
Public carstuf
Public yardstuf
and so o
At the end of the modul
I have a sub mai
The module looks like this
=============== ===
Module myMo
Public carstuf
Public yardstuf
and mor
-----------------
Sub Main(
Can someone please tell what statement I can put in here to load and sho form1 End Su

End Modul
=============== ============
I tried all of the vb6 ways to do this that I know and nothing work
Please...
Thank

Nov 20 '05 #4
I finally found this in vb.net2003's help file
=============== =============== ===
Module Hell
' A "Hello World!" program in Visual Basic

Sub Main(
'MsgBox("Hello World!") ' Display message on computer screen
' Instantiate a new instance of Form1
Dim f1 As New Form
' Display a messagebox. This shows the application is running,
' yet there is nothing shown to the user. This is the point at
' which you customize your form
System.Windows. Forms.MessageBo x.Show("The application is running now, but no forms have been shown."
' Customize the form
f1.Text = "Running Form
' Show the instance of the form modally
f1.ShowDialog(
End Su
End Modul
=============== =============== =============== ====
Thank

----- Michael Horton wrote: ----

Dim frm as new Form
frm.sho

in Sub Main() should do it

"kyle" <an*******@disc ussions.microso ft.com> wrote in messag
news:45******** *************** ***********@mic rosoft.com..
Hi ther
I have a small vb.net 2003 program with 5 forms: form1, form2, et
I have a module in the program from where I want to launch form1 - th main for In the module I have a bunch of public declarations like
Public carstuf
Public yardstuf
and so o
At the end of the modul
I have a sub mai
The module looks like this
=============== ===
Module myMo
Public carstuf
Public yardstuf
and mor
-----------------
Sub Main(
Can someone please tell what statement I can put in here to load and sho form1 End Su

End Modul
=============== ============
I tried all of the vb6 ways to do this that I know and nothing work
Please...
Thank

Nov 20 '05 #5
Instead of the line
f1.ShowDialog()
,you should probably be using
Application.Run (f1)
To make sure that the message pump is handled correctly.
"kyle" <an*******@disc ussions.microso ft.com> wrote in message
news:CC******** *************** ***********@mic rosoft.com...
I finally found this in vb.net2003's help file:
=============== =============== ====
Module Hello
' A "Hello World!" program in Visual Basic.

Sub Main()
'MsgBox("Hello World!") ' Display message on computer screen.
' Instantiate a new instance of Form1.
Dim f1 As New Form1
' Display a messagebox. This shows the application is running,
' yet there is nothing shown to the user. This is the point at
' which you customize your form.
System.Windows. Forms.MessageBo x.Show("The application is running now, but no forms have been shown.") ' Customize the form.
f1.Text = "Running Form"
' Show the instance of the form modally.
f1.ShowDialog()
End Sub
End Module
=============== =============== =============== =====
Thanks

----- Michael Horton wrote: -----

Dim frm as new Form1
frm.show

in Sub Main() should do it.

"kyle" <an*******@disc ussions.microso ft.com> wrote in message
news:45******** *************** ***********@mic rosoft.com...
> Hi there
> I have a small vb.net 2003 program with 5 forms: form1, form2, etc
> I have a module in the program from where I want to launch form1 - the
main form
> In the module I have a bunch of public declarations like:
> Public carstuff
> Public yardstuff
> and so on
> At the end of the module
> I have a sub main
> The module looks like this:
> =============== ====
> Module myMod
> Public carstuff
> Public yardstuff
> and more
> ------------------
> Sub Main()
>> Can someone please tell what statement I can put in here to load
and show
form1? >> End Sub

> End Module
> =============== =============
> I tried all of the vb6 ways to do this that I know and nothing

works > Please....
> Thanks
>

Nov 20 '05 #6
Instead of the line
f1.ShowDialog()
,you should probably be using
Application.Run (f1)
To make sure that the message pump is handled correctly.
"kyle" <an*******@disc ussions.microso ft.com> wrote in message
news:CC******** *************** ***********@mic rosoft.com...
I finally found this in vb.net2003's help file:
=============== =============== ====
Module Hello
' A "Hello World!" program in Visual Basic.

Sub Main()
'MsgBox("Hello World!") ' Display message on computer screen.
' Instantiate a new instance of Form1.
Dim f1 As New Form1
' Display a messagebox. This shows the application is running,
' yet there is nothing shown to the user. This is the point at
' which you customize your form.
System.Windows. Forms.MessageBo x.Show("The application is running now, but no forms have been shown.") ' Customize the form.
f1.Text = "Running Form"
' Show the instance of the form modally.
f1.ShowDialog()
End Sub
End Module
=============== =============== =============== =====
Thanks

----- Michael Horton wrote: -----

Dim frm as new Form1
frm.show

in Sub Main() should do it.

"kyle" <an*******@disc ussions.microso ft.com> wrote in message
news:45******** *************** ***********@mic rosoft.com...
> Hi there
> I have a small vb.net 2003 program with 5 forms: form1, form2, etc
> I have a module in the program from where I want to launch form1 - the
main form
> In the module I have a bunch of public declarations like:
> Public carstuff
> Public yardstuff
> and so on
> At the end of the module
> I have a sub main
> The module looks like this:
> =============== ====
> Module myMod
> Public carstuff
> Public yardstuff
> and more
> ------------------
> Sub Main()
>> Can someone please tell what statement I can put in here to load
and show
form1? >> End Sub

> End Module
> =============== =============
> I tried all of the vb6 ways to do this that I know and nothing

works > Please....
> Thanks
>

Nov 20 '05 #7
Aye Aye!! Si

----- Philip Rieck wrote: ----

Instead of the lin
f1.ShowDialog(
,you should probably be usin
Application.Run (f1
To make sure that the message pump is handled correctly
"kyle" <an*******@disc ussions.microso ft.com> wrote in messag
news:CC******** *************** ***********@mic rosoft.com..
I finally found this in vb.net2003's help file
=============== =============== ===
Module Hell
' A "Hello World!" program in Visual Basic
Sub Main( 'MsgBox("Hello World!") ' Display message on computer screen
' Instantiate a new instance of Form1
Dim f1 As New Form
' Display a messagebox. This shows the application is running
' yet there is nothing shown to the user. This is the point a
' which you customize your form
System.Windows. Forms.MessageBo x.Show("The application is runnin

now, but no forms have been shown." ' Customize the form
f1.Text = "Running Form
' Show the instance of the form modally
f1.ShowDialog(
End Su
End Modul
=============== =============== =============== ====
Thank
----- Michael Horton wrote: ----
Dim frm as new Form frm.sho
in Sub Main() should do it
"kyle" <an*******@disc ussions.microso ft.com> wrote in messag

news:45******** *************** ***********@mic rosoft.com..
Hi ther
I have a small vb.net 2003 program with 5 forms: form1, form2, et
I have a module in the program from where I want to launch form1 th main for
In the module I have a bunch of public declarations like
Public carstuf
Public yardstuf
and so o
At the end of the modul
I have a sub mai
The module looks like this
=============== ===
Module myMo
Public carstuf
Public yardstuf
and mor
-----------------
Sub Main(
Can someone please tell what statement I can put in here to loa
and sho
form1 End Su

End Modul
=============== ============
I tried all of the vb6 ways to do this that I know and nothin

work Please...
Thank

Nov 20 '05 #8
Aye Aye!! Si

----- Philip Rieck wrote: ----

Instead of the lin
f1.ShowDialog(
,you should probably be usin
Application.Run (f1
To make sure that the message pump is handled correctly
"kyle" <an*******@disc ussions.microso ft.com> wrote in messag
news:CC******** *************** ***********@mic rosoft.com..
I finally found this in vb.net2003's help file
=============== =============== ===
Module Hell
' A "Hello World!" program in Visual Basic
Sub Main( 'MsgBox("Hello World!") ' Display message on computer screen
' Instantiate a new instance of Form1
Dim f1 As New Form
' Display a messagebox. This shows the application is running
' yet there is nothing shown to the user. This is the point a
' which you customize your form
System.Windows. Forms.MessageBo x.Show("The application is runnin

now, but no forms have been shown." ' Customize the form
f1.Text = "Running Form
' Show the instance of the form modally
f1.ShowDialog(
End Su
End Modul
=============== =============== =============== ====
Thank
----- Michael Horton wrote: ----
Dim frm as new Form frm.sho
in Sub Main() should do it
"kyle" <an*******@disc ussions.microso ft.com> wrote in messag

news:45******** *************** ***********@mic rosoft.com..
Hi ther
I have a small vb.net 2003 program with 5 forms: form1, form2, et
I have a module in the program from where I want to launch form1 th main for
In the module I have a bunch of public declarations like
Public carstuf
Public yardstuf
and so o
At the end of the modul
I have a sub mai
The module looks like this
=============== ===
Module myMo
Public carstuf
Public yardstuf
and mor
-----------------
Sub Main(
Can someone please tell what statement I can put in here to loa
and sho
form1 End Su

End Modul
=============== ============
I tried all of the vb6 ways to do this that I know and nothin

work Please...
Thank

Nov 20 '05 #9

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

Similar topics

6
6159
by: Martin Bless | last post by:
The good news: Along with Python-2.4 comes really good news to Windows users. Yes, you now CAN build extension modules yourself using the SAME C++ compiler and linker Python is built with itself. Everything you need is available at no costs (except download hassle and installation time). Once your system is set up properly its just a matter...
4
7819
by: spebola | last post by:
I am using vb.net 2003 professional and I get the following results when using the round method: dim Amount as decimal = 180.255 Amount = Amount.Round(Amount, 2) Amount now contains 180.25. I need it to contain 180.26. Any ideas?
8
364
by: kyle | last post by:
Hi ther I have a small vb.net 2003 program with 5 forms: form1, form2, et I have a module in the program from where I want to launch form1 - the main for In the module I have a bunch of public declarations like Public carstuf Public yardstuf and so o At the end of the modul I have a sub mai The module looks like this
9
3074
by: George McCullen | last post by:
I have an Outlook 2003 using Exchange Server 2003 Public Contacts Folder containing 20,000 Contacts. I am writing a VB .Net 2003 program that loops through all the contacts in a "for each oCt in oItems" loop. After about 250 contacts, the program gives an InvalidCastException Error on the for each loop. I notice that Outlook's memory keeps...
0
7666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7584
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8108
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7951
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2083
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1201
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.