473,404 Members | 2,179 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,404 software developers and data experts.

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 2391
Dim frm as new Form1
frm.show

in Sub Main() should do it.

"kyle" <an*******@discussions.microsoft.com> wrote in message
news:45**********************************@microsof t.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*******@discussions.microsoft.com> wrote in message
news:45**********************************@microsof t.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.MessageBox.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*******@discussions.microsoft.com> wrote in messag
news:45**********************************@microsof t.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.MessageBox.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*******@discussions.microsoft.com> wrote in messag
news:45**********************************@microsof t.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*******@discussions.microsoft.com> wrote in message
news:CC**********************************@microsof t.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.MessageBox.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*******@discussions.microsoft.com> wrote in message
news:45**********************************@microsof t.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*******@discussions.microsoft.com> wrote in message
news:CC**********************************@microsof t.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.MessageBox.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*******@discussions.microsoft.com> wrote in message
news:45**********************************@microsof t.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*******@discussions.microsoft.com> wrote in messag
news:CC**********************************@microsof t.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.MessageBox.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*******@discussions.microsoft.com> wrote in messag

news:45**********************************@microsof t.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*******@discussions.microsoft.com> wrote in messag
news:CC**********************************@microsof t.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.MessageBox.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*******@discussions.microsoft.com> wrote in messag

news:45**********************************@microsof t.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
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...
4
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. ...
8
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...
9
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.