473,320 Members | 1,841 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.

Startup application

Hi all,

The entry point of my application is the controller class. After the
creation of some variables a form should be shown. I do:
MainForm myForm = new MainForm;
myForm.Show();

The form shows for a mment but then disappears. How can I show the form in a
proper way?

regards
Stijn
Nov 16 '05 #1
2 1081
Hello Tarscher,
instead try
Application.Run(new MainForm());

-john
Hi all,

The entry point of my application is the controller class. After the
creation of some variables a form should be shown. I do:
MainForm myForm = new MainForm;
myForm.Show();
The form shows for a mment but then disappears. How can I show the
form in a proper way?

regards
Stijn


Nov 16 '05 #2
Hi Stijn,

Controller class?

How are you launching it in Main()? Could you show us more detailed code
where you start myform?
You need to attach a messageloop (Application.Run) if there isn't one
already.

--
Happy Coding!
Morten Wennevik [C# MVP]
Nov 16 '05 #3

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

Similar topics

7
by: cefrancke | last post by:
I cant seem to find a straight answer on the following. I want to programmatically hide all menus except a basic custom report menu (during report preview) and right click pop-up A-Z sorting on...
2
by: Simon Harvey | last post by:
Hi all, I was wondering how most developers handle the initial startup of their Windows Forms applications? When you make an application in Visual Studio, the IDE places Main in the form that...
4
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...
3
by: tbone | last post by:
In trying to improve the throughput of a classic ASP app I wrote a few years ago, I added monitoring to the application and session start and end methods. I'm counting the total number of sessions...
10
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. ...
9
by: jeff | last post by:
Hi All. I realize that when my Deployed winforms application starts, Windows needs to load the .net 2 framework before control is given to my application.... Is there anyway to either ... -...
8
by: cj | last post by:
In 2003 I sometimes changed the startup object of a project to Sub Main which was found in Module1.vb. I upgraded one such project to 2005 and I notice in the properties page for the project that...
10
by: =?Utf-8?B?UmljaGFyZCBCeXNvdXRo?= | last post by:
Hi In my app I have a SplashScreen, a login form and a main form. On launching the app, I'd like to show the SplashScreen while reading config files and attempting a database connection. I show...
10
by: kimiraikkonen | last post by:
Hi there, I figured out, for the first execution for any .NET-powered app such as VB.NET or C#, it takes 7-8 seconds to see main form of "any" application even the application consists of a single...
4
by: Jeff Ciaccio | last post by:
I'm new to vb.net and was wondering what the syntax is for application events such as starting up or shutting down. For example, if you would just like to get a user's name with an input box when...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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...
1
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: 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.