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

AppStartup "Cancel" leaves splash form loaded

Hello,

I'm finding that if I set the "Cancel" property during the AppStartup
event, the application's Splash form remains loaded.

A call to the Close property of the SplashForm at that point returns a
cross-threading error, since (it appears) the Splashform is loaded by a
different thread.

Any advice? I could ignore the SplashForm application setting and just
load it myself, I suppose.

Thanks,

g.

May 21 '06 #1
4 1471
Graham Charles wrote:
Hello,

I'm finding that if I set the "Cancel" property during the AppStartup
event, the application's Splash form remains loaded.

A call to the Close property of the SplashForm at that point returns a
cross-threading error, since (it appears) the Splashform is loaded by a
different thread.

Any advice? I could ignore the SplashForm application setting and just
load it myself, I suppose.

Thanks,

g.

Well need to see code on how you are starting your splash screen and
other startup code.

Chris
May 22 '06 #2
On 21 May 2006 15:23:51 -0700, "Graham Charles" <gr****@aiid.com>
wrote:
Hello,

I'm finding that if I set the "Cancel" property during the AppStartup
event, the application's Splash form remains loaded.

A call to the Close property of the SplashForm at that point returns a
cross-threading error, since (it appears) the Splashform is loaded by a
different thread.

Any advice? I could ignore the SplashForm application setting and just
load it myself, I suppose.

Thanks,

g.


I ran across a couple of articles a few months ago that claimed that
this is a bug. As the event fires before the startup form, itself, is
created, it "should" logically fire before the splash form is created.
Logically, you would use the startup event to evaluate some condition
or conditions the result(s) of which dictate whether or not the
application should run. If the result(s) is no, setting the Cancel
argument to True ends the startup and precludes the application from
running. It therefore makes no sense to even display a splash screen
prior to running any condition code in the event.

One suggested alternative (which I use) is:
1) Not specify a splash screen in the project
2) Show a SplashForm as the last line of code in the Startup Event.
3) Make the MainForm visible ASAP in the LoadEvent
4) Continue with LoadEvent code execution
5) Close the SplashForm at the end of the MainForm load event. This
line can optionally be preceded by a Thread.Sleep statement which can
be used to adjust the display time of the SplashForm.
Another example I ran across suggests to use the Project specified
SplashScreen and simply add an End statement after Cancel is set to
True, the argument being that this is one instance where it is safe to
use "End". It does work, but I prefer the other method.

Gene


May 22 '06 #3
Graham,

Who gives you the right to let the user not cancel a splash screen.
I would call this a major bug in your program if I had to use it and that is
not possible.

One of the SP parts of Internet Explorer is to prevent that this could be
done.

Just my thought,

Cor
"Graham Charles" <gr****@aiid.com> schreef in bericht
news:11**********************@j73g2000cwa.googlegr oups.com...
Hello,

I'm finding that if I set the "Cancel" property during the AppStartup
event, the application's Splash form remains loaded.

A call to the Close property of the SplashForm at that point returns a
cross-threading error, since (it appears) the Splashform is loaded by a
different thread.

Any advice? I could ignore the SplashForm application setting and just
load it myself, I suppose.

Thanks,

g.

May 22 '06 #4
On Mon, 22 May 2006 08:42:18 +0200, "Cor Ligthert [MVP]"
<no************@planet.nl> wrote:
Graham,

Who gives you the right to let the user not cancel a splash screen.
I would call this a major bug in your program if I had to use it and that is
not possible.

One of the SP parts of Internet Explorer is to prevent that this could be
done.

Just my thought,

Cor


I think you completly misunderstood the OP's post.

Gene

May 22 '06 #5

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

Similar topics

2
by: Hernán Castelo | last post by:
hi i'm doing a reload() in JS in the production site i get the message "send again information...... : retry / cancel" but in development site works fine what differencia could be between the...
1
by: Jane | last post by:
How to set the default button to "Cancel" instead of "OK" when pop-up the message box using the codes below: if (window.confirm("Are you sure you want to delete?")) { //Proceed to delete } ...
5
by: Quinn | last post by:
When users clicked a unkown mime type link such as Zip on my website, a "Save/Open/Cancel" dialog box pops up. Is there a way to detect which button users clicked by using ASP? actually I only what...
3
by: dhnriverside | last post by:
Hi peeps I'm developing an intranet application which uses a main window and various popups created with javascript ( window.open() ). When the user saves what they are doing in the popup, i...
5
by: Diego | last post by:
How do I capture a cancel event of Printer dialog box? Regards, Diego
1
by: Appu | last post by:
How to Check in the window print dialog box whether we clicked either "print" or "cancel". while clicking a button i call wnidow.print() to pop up the windows PRint Dialog box. I want to check...
1
by: shaizaban | last post by:
hello, my question is as follows (very urgent): i generated in an aspx page a modalpopup ajax control. i inserted a user control into the panel contained in the popup control. the panel contains...
11
by: kimiraikkonen | last post by:
Hi, Vb.net 2005 express i've been working, the problem is: I use openfiledialog to browse files, i created some code to execute file with OK button, no problem. But if i press "cancel" button as...
2
Claus Mygind
by: Claus Mygind | last post by:
Is there a newer version of javaScript that will allow other text on the confirm dialogue box in place of "Ok" and "Cancel" Specifically for FireFox. I know that I can use visual basic for internet...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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:
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
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...

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.