Re: Weird Unhandled Exception

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Jeremy (jezonline_at_hotmail.com)
Date: 03/05/05


Date: Sat, 5 Mar 2005 19:37:49 -0000

rough guess.. try calling Application.Exit from your main form, this will
definitely exit all forms.

"Aaron" <ABieberitz@charter.net> wrote in message
news:r06f21dor93qq6enlvt3vgkbr10ut8der1@4ax.com...
> In a related question, why is this menu code for exiting my
> application, only disposing of the open form and showing the next form
> underneath, shouldn't it be disposing of all forms when I call
> Application.Exit()?
>
> Private Sub mnuExit_Click(ByVal sender As System.Object, ByVal e
> As System.EventArgs) Handles mnuExit.Click
> Me.Dispose()
> Application.Exit()
> End Sub
>
> On Thu, 3 Mar 2005 06:41:57 -0500, "<ctacke/>"
> <ctacke_AT_OpenNETCF_com> wrote:
>
> >My point is the fact that the captions show up in Running Programs tells
me
> >that you're not getting them changed. Looking at your code I see you
change
> >the caption after calling ShowDialog.
> >
> >You're aware that ShowDialog is blocking, right? So the Caption isn't
going
> >to get changed until *after* the form you display with ShowDialog is
> >dismissed. This means that, based on your code, I would expect to see
the
> >caption on the dialog and the parent in Running Programs when the dialog
is
> >up.
> >
> >If you had simply placed a break point anywhere in the dialog's code,
then
> >using the immediate window looked at the Text property for both the
dialog
> >and the parent at that break point you would have seen this to be the
case.
> >
> >-Chris
> >
> >
> >
> >"Aaron" <ABieberitz@charter.net> wrote in message
> >news:5u6d21ldh196kkigp0gcbhklb4eqr0q0td@4ax.com...
> >> Exactly what shouldn't, the captions of my windows, over and over, one
> >> for each one that's open, yet I have set the text in everyone to an
> >> empty string. This exact same block of code (only in C#) in a
> >> previous C# project worked just fine, but not here for some reason.
> >>
> >> On Wed, 2 Mar 2005 23:00:21 -0500, "<ctacke/>"
> >> <ctacke_AT_OpenNETCF_com> wrote:
> >>
> >>>So what shows up in Running Programs? It enumerates the captions of
> >>>top-level Windows. If your caption is empty, what exactly is
displaying?
> >>>
> >>>-Chris
> >>>
> >>>
> >>>"Aaron" <ABieberitz@charter.net> wrote in message
> >>>news:sdec211dmnlug0tdvmsbgl6h9cn1b45iq6@4ax.com...
> >>>> Why is it that setting the current (open) form's text to "" does not
> >>>> remove it from the running programs listing in WM 2003. I know forms
> >>>> are not enumerated, that's why everyone on this board says set the
> >>>> text to "", yet it doesn't work, why?
> >>>>
> >>>> Here's an example of what I'm doing...On this form on the button
> >>>> click:
> >>>>
> >>>> Private Sub btnEnter_Click(ByVal sender As System.Object, ByVal e
> >>>> As System.EventArgs) Handles btnEnter.Click
> >>>> frmLoginHelper.Instance().Text = "My App" 'Set title bar text
> >>>> frmLoginHelper.Instance().ShowDialog() 'Show form
> >>>> Me.Text = ""
> >>>> End Sub
> >>>>
> >>>> So what am I doing wrong, or is something buggy?
> >>>>
> >>>> Thanks
> >>>
> >>
> >
>


Quantcast