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

Controlling the Opening and Closing of Forms in Windows Apllication

I need an urgent help,I have a startup form for loading my application,then after the load(closing that form),another 2 forms are opened :Main Application Form and Login Form,The Login Form appears as modal form,so as to the user must login or register first then the main application form appears,This surely after closing the login form.What happens is both of these 2 forms are still opened in the background and also the startup form appears as notification for the current running program.I tried a lot of methods such as:Close(),Dispose(),Hide() ,but with no use.This problem repeates with all other forms.So,What can I do in details ,please?????Thanks I Advance.
Jan 31 '12 #1
2 1494
PsychoCoder
465 Expert Mod 256MB
Why don't you show the code that's causing this issue as we're not mind readers :)
Feb 1 '12 #2
private void Form1_Load(object sender, EventArgs e)
{
timer1.Enabled = true;
timer1_Tick(progressBar1, e);
}


int min, max;
private void timer1_Tick(object sender, EventArgs e)
{
// timer1.Start();
timer1.Enabled = true;
progressBar1.Minimum = 0;
progressBar1.Maximum = 10000;
min = progressBar1.Minimum;
max = progressBar1.Maximum;


for (int i = progressBar1.Minimum; i <= progressBar1.Maximum; i++)
{

progressBar1.Increment(1);
progressBar1.Value=i;
// progressBar1.PerformStep();
}

if (progressBar1.Value == max)
{

timer1.Enabled = false;
// MessageBox.Show("The form is already opened");
this.Show();

ManagementForm manage = new ManagementForm();
manage.Show();
LoginForm login = new LoginForm();
login.ShowDialog();
this.Close();
this.Dispose();



}



}
Feb 1 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Guest | last post by:
Hi, I am writing a Jeopardy-like game that contains three forms. One is the Jeopardy board, another is the Question/Answer displayer, and the last is the scoreboard. I need to find a way to...
5
by: Daves | last post by:
is it a good or bad practise to use the session_start & session_end for opening & closing the database connection? I'd thought that on powerful servers today the time the connection is kept locked...
7
by: spebola | last post by:
I am using VB.Net 2003 professional edition, and .Net Framework 1.1, and Windows forms. What is the proper way to close a windows form displayed by the Show method? I would like it to be removed...
9
by: G .Net | last post by:
Hi I'm wondering if anybody can help me with the following problem. Suppose I have 3 forms: A, B and C. Pressing a button on form A, shows (using ShowDialog) form B. Pressing a button on...
5
by: tara99 | last post by:
I have forms which changes it size when I open it, close it, go to another form via button from existing form and come back to it when i close the new open form. I don't have any code behind...
3
by: Arne Beruldsen | last post by:
The migration from VB6 is anything but easy. Ok...I have an introductory form (start-up is via sub main) and then several succeeding forms which gather some info. As soon as the info is gathered...
2
by: Stephen2 | last post by:
I've written a small dos batch script that runs a simple query through osql and then calls an exe which sends an email if the returned value The query checks if a value in a column has not been...
1
by: Salad | last post by:
I have a form that opens another (intermediary) form. The user selects an option on the intermediary form and it opens another form and the intermediary form is closed. Ex: From MainForm...
2
by: =?Utf-8?B?RXRoYW4gU3RyYXVzcw==?= | last post by:
I am (still) relatively new to Windows applications, most of my experience has been Web based, and I am confused about what exactly happens when the Main() method is called and how to manipulate...
13
by: SvenV | last post by:
Hello, Currently I'm developing an application for a Windows CE 4.0 device. This application contains a lot of different forms. The application jumps from one form to another. And I close the...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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,...

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.