Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 14th, 2007, 07:55 PM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help with Windows Forms

Hi,

In my application i have a Main form (Form 1) and a second form (Form 2). I have disabled Form 1 on startup as i want Form 2 to be the active form. So basically Form 1 would only be enabled once Form 2 is done. The problem i have is that whenever the program runs, Form 2 is always behind Form 1. I have used the BringtoFront() command, the Activate() command so that Form 2 would be in front of Form 1 but it doesnt work. I placed the following code in the Form 1 Load section.

pass dpass = new pass();
dpass.passControl = new pass.PassControl(VerifyData);
dpass.BringToFront();
dpass.Show();

I was hoping someone here could help me display Form 2 infront of Form 1 during startup. Form 2 shows the moment form 1 loads.

 
Old January 16th, 2007, 11:58 AM
Authorized User
 
Join Date: Apr 2006
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can't you startup with form2 like it was a splash screen and when you hit ok it shows up form1 for instance?






Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Forms sambathrajmca Windows Workflow 1 November 27th, 2007 06:25 AM
windows forms lakshmiR .NET Framework 1.x 1 August 31st, 2007 08:32 PM
Windows Forms Threading julesmel C# 3 October 5th, 2006 05:21 AM
windows forms chandrasekhar ASP.NET 2.0 Professional 2 February 27th, 2006 10:41 PM
Windows forms eyan C# 1 July 1st, 2004 04:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.