473,480 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Which is First Form in Project?

Something very basic I either never thought about, or (more likely) once
knew and by now have totally forgotten.

I have developed a Windows application in VB.NET, all based on a single
Form. I would now like to add a Splash Screen to the project, which
should be seen by the user whenever the project is launched, before the
main Form is displayed.

How do I do this?
--
Alan M Dunsmuir
Nov 21 '05 #1
7 1103
Hi Alan,

Create your splash screen form. In Visual Studio, right-click your
project and go to Properties. Under the "General" item of the "Common
Properties" category there will be a drop-down box called "Startup
Object". It'll be on the second line down.

You have two choices for the entrypoint: either a Sub Main() somewhere
in your code or a form (the compiler generates a Sub Main() for you and
simply Application.Run()'s your new form in it).

Change the Startup Object to point to your splashscreen form and it will
be the first form displayed. Then you start the main form via the splash
screen.

Hope that helps!

Regards,
-Adam.
Alan M Dunsmuir wrote:
Something very basic I either never thought about, or (more likely) once
knew and by now have totally forgotten.

I have developed a Windows application in VB.NET, all based on a single
Form. I would now like to add a Splash Screen to the project, which
should be seen by the user whenever the project is launched, before the
main Form is displayed.

How do I do this?

Nov 21 '05 #2
Right click your application in the solution explorer, then properties,
there you can select startup object.

Greetz Peter

"Alan M Dunsmuir" <al**@moonrake.demon.co.uk> wrote in message
news:le**************@moonrake.demon.co.uk...
Something very basic I either never thought about, or (more likely) once
knew and by now have totally forgotten.

I have developed a Windows application in VB.NET, all based on a single
Form. I would now like to add a Splash Screen to the project, which
should be seen by the user whenever the project is launched, before the
main Form is displayed.

How do I do this?
--
Alan M Dunsmuir

Nov 21 '05 #3
Alan,

A form is not showed before the load event of that form is finished (when
you not force that with me.show in the sub new or that loadevent).

Therefore you can set in the load event of your main form
dim splash as new form2
splash.showdialog
splash.dispose

On that form2 you drag a timer and set it to enable = true and set the
interval too the miliseconds you wants

Than you create in that form a timer elepsed event with only in that
me.close

Your splash form is ready.

I hope this helps?

Cor
"Alan M Dunsmuir" <al**@moonrake.demon.co.uk> schreef in bericht
news:le**************@moonrake.demon.co.uk...
Something very basic I either never thought about, or (more likely) once
knew and by now have totally forgotten.

I have developed a Windows application in VB.NET, all based on a single
Form. I would now like to add a Splash Screen to the project, which should
be seen by the user whenever the project is launched, before the main Form
is displayed.

How do I do this?
--
Alan M Dunsmuir

Nov 21 '05 #4
In message <OC*************@TK2MSFTNGP10.phx.gbl>, Adam Goossens
<ad**********@users.sourceforge.net> writes
Hi Alan,

Create your splash screen form. In Visual Studio, right-click your project and
go to Properties. Under the "General" item of the "Common Properties"
category there will be a drop-down box called "Startup Object". It'll be on the
second line down.

Thanks for that pointer. I really don't know how I managed to miss it in
my check through of possibilities.

Now another related point.

Once the project is executing, what's the simplest way of switching from
one form to another?

In VB6 I used to go

Forms!Form2.Activate
Forms!Form1.Close

With VB.NET the closest equivalent I can find (since it won't allow me
to point directly at Form2 from inside Form1) is:

Dim myForm2 as New Form2
Me.Hide

Here, if I try closing Form1 instead of simply hiding it, the whole
project shuts down.

Is this the best and most direct way of switching from one form to
another?

Does this mean that in a complex application consisting of many
different forms, I have to leave them all open behind me as I navigate
from one to the next?

Doesn't this have significant memory implications?
--
Alan M Dunsmuir
Nov 21 '05 #5
In message <OC*************@TK2MSFTNGP10.phx.gbl>, Adam Goossens
<ad**********@users.sourceforge.net> writes
Hi Alan,

Create your splash screen form. In Visual Studio, right-click your project and
go to Properties. Under the "General" item of the "Common Properties"
category there will be a drop-down box called "Startup Object". It'll be on the
second line down.

Thanks for that pointer. I really don't know how I managed to miss it in
my check through of possibilities.

Now another related point.

Once the project is executing, what's the simplest way of switching from
one form to another?

In VB6 I used to go

Forms!Form2.Activate
Forms!Form1.Close

With VB.NET the closest equivalent I can find (since it won't allow me
to point directly at Form2 from inside Form1) is:

Dim myForm2 as New Form2
Me.Hide

Here, if I try closing Form1 instead of simply hiding it, the whole
project shuts down.

Is this the best and most direct way of switching from one form to
another?

Does this mean that in a complex application consisting of many
different forms, I have to leave them all open behind me as I navigate
from one to the next?

Doesn't this have significant memory implications?
--
Alan M Dunsmuir
Nov 21 '05 #6
You can use

dim objForm as new Form1
objForm.show

for example if you have a menu and when you click on a menuitem and you want
to show a form you can use this code

hth greetz Peter

"Alan M Dunsmuir" <al**@moonrake.demon.co.uk> wrote in message
news:vW**************@moonrake.demon.co.uk...
In message <OC*************@TK2MSFTNGP10.phx.gbl>, Adam Goossens
<ad**********@users.sourceforge.net> writes
Hi Alan,

Create your splash screen form. In Visual Studio, right-click your project andgo to Properties. Under the "General" item of the "Common Properties"
category there will be a drop-down box called "Startup Object". It'll be on thesecond line down.

Thanks for that pointer. I really don't know how I managed to miss it in
my check through of possibilities.

Now another related point.

Once the project is executing, what's the simplest way of switching from
one form to another?

In VB6 I used to go

Forms!Form2.Activate
Forms!Form1.Close

With VB.NET the closest equivalent I can find (since it won't allow me
to point directly at Form2 from inside Form1) is:

Dim myForm2 as New Form2
Me.Hide

Here, if I try closing Form1 instead of simply hiding it, the whole
project shuts down.

Is this the best and most direct way of switching from one form to
another?

Does this mean that in a complex application consisting of many
different forms, I have to leave them all open behind me as I navigate
from one to the next?

Doesn't this have significant memory implications?
--
Alan M Dunsmuir

Nov 21 '05 #7
You can use

dim objForm as new Form1
objForm.show

for example if you have a menu and when you click on a menuitem and you want
to show a form you can use this code

hth greetz Peter

"Alan M Dunsmuir" <al**@moonrake.demon.co.uk> wrote in message
news:vW**************@moonrake.demon.co.uk...
In message <OC*************@TK2MSFTNGP10.phx.gbl>, Adam Goossens
<ad**********@users.sourceforge.net> writes
Hi Alan,

Create your splash screen form. In Visual Studio, right-click your project andgo to Properties. Under the "General" item of the "Common Properties"
category there will be a drop-down box called "Startup Object". It'll be on thesecond line down.

Thanks for that pointer. I really don't know how I managed to miss it in
my check through of possibilities.

Now another related point.

Once the project is executing, what's the simplest way of switching from
one form to another?

In VB6 I used to go

Forms!Form2.Activate
Forms!Form1.Close

With VB.NET the closest equivalent I can find (since it won't allow me
to point directly at Form2 from inside Form1) is:

Dim myForm2 as New Form2
Me.Hide

Here, if I try closing Form1 instead of simply hiding it, the whole
project shuts down.

Is this the best and most direct way of switching from one form to
another?

Does this mean that in a complex application consisting of many
different forms, I have to leave them all open behind me as I navigate
from one to the next?

Doesn't this have significant memory implications?
--
Alan M Dunsmuir

Nov 21 '05 #8

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

Similar topics

19
2125
by: DotNetIsHorrible | last post by:
I write CRUD database applications for a living for an audience of about 100 users per application using classic ASP. I maintain and frequently change on user's request 22 different applications...
10
4274
by: Mike L | last post by:
This is for a Win form. Currently, the first record is shown in the combo box. I want the combo box to be blank and when the user clicks on the down arrow to choose from the list and clicks on...
4
1773
by: Lerp | last post by:
Hi all, With regards to calling data from a database and filling in an editing form based on some query, which is the best (least intensive on processor) method for assigning the returned...
4
2871
by: Christopher C. Bernholt | last post by:
We have a solution which contains 2 projects. The first project is a windows control and it references an assembly. The second project is a test windows application used to test the windows...
1
2683
by: surendra.rajput | last post by:
hi all friends I want your help. I am working with HTML help Workshop ,In run time it show first page Blank(Default page) .How i can Set First Page of Help file .
6
1613
by: mscertified | last post by:
I'm about to start my first Dot Net Project. It seems fairly simple but then I'm a neophyte. I've just taken a few dot.net courses and have some background in classic ASP. The application is...
8
3477
AccessIdiot
by: AccessIdiot | last post by:
I'm having some trouble going from one form to another and carrying over the ID field (see this thread if you are interested). So I was thinking about ways around the problem. As far as my very...
1
2045
by: Denise | last post by:
I have several big forms that are Maximized on Load. I have "Jump" buttons on each to flip to other related forms. - 'Needs' form has jump button to it's linked Project, if it is linked - Project...
5
3190
by: jmartmem | last post by:
Greetings, I have built an Update Record Form in an ASP page. This form contains a number of fields, such as text boxes and menus, to name a few. Upon clicking the 'submit' button, I want the...
0
6908
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
7084
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...
1
6739
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
4481
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2995
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2984
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
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 ...
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
181
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...

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.