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

Home Posts Topics Members FAQ

How to set a startup Form??

Hi,
I got two forms, named Form1 and Form2 ion a VB.NET
Windows application.. by default if i run the application,
Form1 gets launched..i need to set Form2 as the startup
form how do i do it??
Thanks.
Imaya Kumar J.
Nov 22 '05 #1
2 4272
Right click the project in the solution explorer and choose properties, then
on the build pages you can set the startup form.
"Imayakumar " <im******@hotma il.com> wrote in message
news:07******** *************** *****@phx.gbl.. .
Hi,
I got two forms, named Form1 and Form2 ion a VB.NET
Windows application.. by default if i run the application,
Form1 gets launched..i need to set Form2 as the startup
form how do i do it??
Thanks.
Imaya Kumar J.

Nov 22 '05 #2
(This applies to C#)

Go to your current startup form.
Find the following section:

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run (MyForm);
}

Cut it out and paste it into the form which you now wish
to be the new startup form.

Remember to change whatever is in the place of "MyForm"
to your new form's name.

- Ken K.
-----Original Message-----
Hi,
I got two forms, named Form1 and Form2 ion a VB.NET
Windows application.. by default if i run the application,Form1 gets launched..i need to set Form2 as the startup
form how do i do it??
Thanks.
Imaya Kumar J.
.

Nov 22 '05 #3

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

Similar topics

2
336
by: Imayakumar | last post by:
Hi, I got two forms, named Form1 and Form2 ion a VB.NET Windows application.. by default if i run the application, Form1 gets launched..i need to set Form2 as the startup form how do i do it?? Thanks. Imaya Kumar J.
1
5378
by: John Michael | last post by:
I have created some password routines to protect certain forms from access without a password. This allows me to create some security for apps that will be used on diff machines for users that will not have to learn the whole access security process and me as well. I would like to lockup my database by unchecking all of the options in the tools/startup from. I know i can create custom menus, toolbars and command bars and add a link to...
10
16155
by: PC Datasheet | last post by:
How can I programatically set the startup form when the database opens? Thanks! Steve
4
3908
by: Chris Ashley | last post by:
I have a class called App set as the startup object with the following code: Friend Class App Shared Sub Main() Dim FrmMain As New MainForm Application.Run(FrmMain) End Sub End Class In another form I use the following code:
6
1732
by: Steve Enzer | last post by:
My project uses a MDI parent form and several child forms. I need to call a public sub in the parent form (which is also the startup object) from one of the child forms in order to change the appearance of the toolbar under certain conditions. So far I have not figured out how to reference the sub from another form. I figure I need the object name of the startup form, but since I don't declare this in code as I do the other forms, I...
4
7852
by: Johnnie Miami | last post by:
I'm using VB.Net 2005 beta 2 and have my login form (login.vb) specified as the startup form. If the user is successful logging in, I call my main form (main.vb). This all works fine but the problem is that the login form stays open. I put a me.close (in the login form) after opening the main form but that seems to close everything and the main form is not displayed. I thought I could call a Sub Main() that calls the login form, closes...
10
3003
by: Bernie Hunt | last post by:
This is probably a silly question, but I've gotten myself confused. My app has two forms, form1 and form2. form1 is the start up object in the propers. An event in form1 instantiates form2. Dim myForm as HardwareStore myForm = New HardwareStore myForm.Show() I understand that my form2 can be referenced by
2
2415
by: Glyn | last post by:
Hi All, Access 2000 SR1 Windows XP SP2 Word 2000 I have a button on a form (frmMainMenu) that calls a second form (frmContractPrint). In the second form is a combo box (cboContractNumber) and the user selects a contract number from the list. The combo box list is used in a query, which in turn is used to
0
918
by: Jack Russell | last post by:
I just converted my project from Vb.net 2003 to express 2005 I get the following message frmmain is a type in 'TCW3' and cannot be used as an expression. File is TCW3MainForm.vb line 0 column 0 This is caused by having frmmain as the startup form. If I change it to another form the message goes away. I created a dummy form which calls
2
2615
by: Amjad Mahmood | last post by:
I have recently joined a pharmacuetical company as a Manager M.I.S I have source code of an oracle application developed in 6i by my predecessor. I am unable to take help from him due to some technical reasons. All I have is the server administration, source code files for oracle clients. I have to change the main connection password, but if I do so all the users will be unable to logon to the application. Does this mean that the...
0
9645
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10091
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8972
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5381
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.