473,473 Members | 2,126 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Application.Run() and ShowDialog error

I have a Appication starting thought a Module Main sub
<System.STAThread()> _
Public Sub Main()
System.Windows.Forms.Application.EnableVisualStyle s()
System.Windows.Forms.Application.Run(splash)

End Sub

This works great, I start my splash screen and move on from there, now
from my main form I have a about menu option. I want the about frm to
be a model form so I use
Dim frmAbout as new About
frmAbout.ShowDialog()

This works also. but…

When I close frmAbout I get a error

An unhandled exception of type
'System.Runtime.InteropServices.SEHException' occurred in
system.windows.forms.dll

Additional information: External component has thrown an exception.
Thanks all
Mike
Nov 20 '05 #1
4 1128
Hi Mike,

I am somewhat confusion about your senario,
1. Is the splash in your code a winform? If so, when do you instantiate the
splash?
2. How do you move on from the splash to the Main Form? i.e. how do you
instantiate and run the MainForm

Can you post the code about the question above?

Just a guess, it seems that you will run the MainForm from the splash, and
the splash form will exit, am I right?
If so, I think you may try to call the Application.Run( new MainForm()) and
display the splash form before the MainForm has been loaded.(e.g. in the
Form_Load event)
Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 20 '05 #2
Hi Mike,

I am writing the post to confirm that if you have tried my suggestion.
If you still have any concern on this issue, please feel free to post here.
Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 20 '05 #3
Thank you, I will give that a try. If I get the same error I will post
more of the code.

Again thanks
Mike


v-******@online.microsoft.com ("Peter Huang") wrote in message news:<CT**************@cpmsftngxa06.phx.gbl>...
Hi Mike,

I am somewhat confusion about your senario,
1. Is the splash in your code a winform? If so, when do you instantiate the
splash?
2. How do you move on from the splash to the Main Form? i.e. how do you
instantiate and run the MainForm

Can you post the code about the question above?

Just a guess, it seems that you will run the MainForm from the splash, and
the splash form will exit, am I right?
If so, I think you may try to call the Application.Run( new MainForm()) and
display the splash form before the MainForm has been loaded.(e.g. in the
Form_Load event)
Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 20 '05 #4
Hi Mike,

How is the things going?
Do you have any concern on this issue?
If so, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 20 '05 #5

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

Similar topics

2
by: alex9128 | last post by:
Hi All, I mean if you writing Sub Main in VB you can start you application either way: Dim mainfrm As Form1 = New Form1() mainfrm.ShowDialog() or just
2
by: Bill Burris | last post by:
When you crate a Windows application the wizard adds a line like: Application.Run( new MyMainForm() ); Out of curiosity I replaced this with: MyMainForm myForm = new MyMainForm();...
1
by: Alpha | last post by:
I have a Window based application that shows up still running in the task manager when I close it. It reaches the "this.close" statement and then it stops at the "}" at the section of the...
4
by: Richard Bell | last post by:
I'm new to VB.net and have a multithreaded application that needs to display a VB form with a cancel button. The thread that displays the form needs to set a cancel flag if the button is pressed. ...
1
by: Mark Denardo | last post by:
Can someone explain the difference between starting an application using Application.Run() and using ShowDialog? Module MainModule Sub Main Dim f1 as New Form1 Application.Run(f1) End Sub...
20
by: Peter Oliphant | last post by:
How does one launch multiple forms in an application? Using Photoshop as an example, this application seems to be composed of many 'disjoint' forms. Yet, they all seem somewhat 'active' in...
6
by: rajendra.mishra | last post by:
Hi... I have a windows vb.net application. The StatupObject is a Module 'modMain'. In the main sub routine i have the following g_frmMain = New formVMMain System.Windows.Forms.Cursor.Current =...
2
by: Learning.Net | last post by:
hi , I have a application which reads files, directory,and its version and version information is written to text file.Its working fine if files in directory are less but problem arises when no...
5
by: =?Utf-8?B?U3JpbWFu?= | last post by:
Hi, We are launching .net window from vb6 form. In .net form tabbing(tab out from one control to another control) was not working. for that i have written a code like Sendkeys.send("{TAB}") in the...
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
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,...
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...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.