Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / January 2008

Tip: Looking for answers? Try searching our database.

Custom ApplicationContext and ClickOnce deployment

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joachim Rosskopf - 21 Dec 2007 07:08 GMT
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
---
Joachim
RobinS - 04 Jan 2008 04:14 GMT
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
---
Joachim

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.