473,320 Members | 1,969 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,320 software developers and data experts.

How to handle form loading in sequence?

Hi there,
I have C# Windows Forms app I am building that has a Splash Screen
and 4 other forms that are to be shown in different sequences depending
on what sequence buttons on the forms are pressed.

I had written a starter class to handle this. The starter class used
ShowDialogue() to open the forms. Each form had a public property
called FormAction that I set with information as to what form to open
next. So when I set the Forms DialogueResult = OK and return the
point of execution to the starter class I could get the FormAction
property and see what form to open next.

But there is no MainForm as such. So I never used Applicaiton.Run()
anywhere, just ShowDialogue() and Dispose(). When I try to the program
just stops at that point and won't go any further. I am getting some
display problems on some of my forms and I have read that it can be due
to NOT using Application.Run().

How can I use Application.Run() if I have no main form?

Thank you for your time,

Scott.

Nov 17 '05 #1
1 1514
Why not just have a main form and hide it?

private void Form1_Load(object sender, System.EventArgs e)
{
this.Visible = false; // Hides it from alt tab
this.ShowInTaskbar = false;
this.WindowState = FormWindowState.Minimized;
}
Nov 17 '05 #2

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

Similar topics

1
by: John Hunter | last post by:
I've recently had a nasty problem with the "Invalid reference to the property Form" error in subforms - nasty because it doesn't seem to consistently happen to all forms which contain the same...
0
by: Joe | last post by:
I've a web form that inherits from a BasePage. There is a user control on the web form. Does anyone thinks it's a problem if I've my BasePage loading a user control and my web form loading a...
3
by: forest demon | last post by:
for example, let's say I do something like, System.Diagnostics.Process.Start("notepad.exe","sample.txt"); if the user does a SaveAs (in notepad), how can i capture the path that the user...
4
by: BerkshireGuy | last post by:
Is there an event that triggers as a form is loading? I want to display a "loading form" event as the form is loading since it tends to take 20 second or so to open. TIA Brian
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.