Custom ApplicationContext and ClickOnce deployment

J

Joachim Rosskopf

Hello,

in a small database-client-application I use a custom
ApplicationContox to first show a splash screen to do some
initialisation in a background worker. After closing that Form a
second Main Form, the real application should be shown. When I start
the application in VisualStudio 2005 everything works fine.

But after deploying the application by ClickOnce the splash screen
shows up and does the work. After closing the Main Form never shows.
After attaching a debugger to the still running process, I see, that
the Form.Show() method of the Main Form blocks.

Here I´ll show you the OnMainFormClosed method of my
ApplicationContext:
<snip>
protected override void OnMainFormClosed(object sender, EventArgs e)
{
if (sender is SplashScreen)
{
base.MainForm = this.mainForm;
base.MainForm.Show(sender as SplashScreen);
MessageBox.Show("After Show;");
}
else if (sender is Main)
{
base.OnMainFormClosed(sender, e);
}
}
</snip>

What´s going wrong.
Regards
 
R

RobinS

I doubt this is a problem with ClickOnce. You might try
just running the exe file under \bin\debug or \bin\release
in your project folder and see if you see the same behavior.

I'd be surprised if you don't. If that's true, you can add
a bunch of messageboxes to see exactly what it's doing, or
write message to a log file, or something like that.

When we first started deploying with ClickOnce, I got a
lot of calls from customer service that the installation wasn't
working for some of the customers. Turns out there was a bug that
happened on some versions of XP that crashed the application
right out of the gate. Oops. My bad!

ClickOnce is basically doing an XCopy and setting up shortcuts
for running the app (assuming you are running both online and
offline). That's why I say the likelihood of this being a
ClickOnce problem is slim. UNLESS you are not including some
component in the deployment that you need.

RobinS.
GoldMail, Inc.
--------------------------------------
Hello,

in a small database-client-application I use a custom
ApplicationContox to first show a splash screen to do some
initialisation in a background worker. After closing that Form a
second Main Form, the real application should be shown. When I start
the application in VisualStudio 2005 everything works fine.

But after deploying the application by ClickOnce the splash screen
shows up and does the work. After closing the Main Form never shows.
After attaching a debugger to the still running process, I see, that
the Form.Show() method of the Main Form blocks.

Here I´ll show you the OnMainFormClosed method of my
ApplicationContext:
<snip>
protected override void OnMainFormClosed(object sender, EventArgs e)
{
if (sender is SplashScreen)
{
base.MainForm = this.mainForm;
base.MainForm.Show(sender as SplashScreen);
MessageBox.Show("After Show;");
}
else if (sender is Main)
{
base.OnMainFormClosed(sender, e);
}
}
</snip>

What´s going wrong.
Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top