Sorry about the delay in getting you an answer, I've been a little busy the last few years. Epicor hides the form before you get the FormClosing event. You just need to re-show the form. The following snippet should do the trick:
args.Cancel = true
UD101Form.Show()
On Mon, Sep 19, 2011 at 8:53 AM, sanfordm99 <sanfordm99@…> wrote:
Â<div> <p><br>
Thanks everyone for the replies. Here is some sample code that I have tried. This compiles fine, but does not work. The form still closes. I am using Version 8.03.408B.
Private Sub UD101Form_Closing(ByVal sender As object, ByVal args As System.ComponentModel.CancelEventArgs) Handles UD101Form.Closing
'//
'// Add Event Handler Code
'//
args.Cancel = true
End Sub
The goal of this is for validation. Basically, after a message box, I want the user to have the option to not close the form. Anyone have any ideas?
Thanks,
Mike > On Thu, Sep 15, 2011 at 8:55 AM, sanfordm99 <sanfordm99@...> wrote:
>
> > **
> >
> >
> > Thanks for the reply. I should have mentioned that I am on version 8 and
> > trying to do this for UD101. It is also VB (which shouldn't matter).
> >
> > Thanks,
> > Mike
> >
> >> > --- In vantage@yahoogroups.com, Jose Gomez <jose@> wrote:
> > >
> > > This works fine for me
> > > private void QuoteEntryForm_FormClosing(object sender,
> > FormClosingEventArgs
> > > e)
> > > {
> > > e.Cancel = true;
> > > }
> > >
> > > *Jose C Gomez*
> > > *Software Engineer*
> > > *
> > > *
> > > *checkout my new blog <http://www.usdoingstuff.com> *
> > > *
> > > *T: 904.469.1524 mobile
> > > E: jose@
> >> > > http://www.josecgomez.com
> > > <http://www.linkedin.com/in/josecgomez> <
> > http://www.facebook.com/josegomez>
> > > <http://www.google.com/profiles/jose.gomez> <
> > http://www.twitter.com/joc85>
> > > <http://www.josecgomez.com/professional-resume/>
> > > <http://www.josecgomez.com/feed/>
> > > <http://www.usdoingstuff.com>
> > >
> > > *Quis custodiet ipsos custodes?*
> > >
> > >
> > >> --> > > On Thu, Sep 15, 2011 at 8:38 AM, sanfordm99 <sanfordm99@> wrote:
> > >
> > > > **
> > > >
> > > >
> > > > Hello,
> > > >
> > > > Has anyone figured this one out? The CancelEventHandler suggested here
> > is
> > > > not a boolean, it is a handler (ie to the closing event). So, it should
> > be
> > > > the args.Cancel = true (which is a property of the handler). This
> > doesn't
> > > > work for me either. Any ideas?
> > > >
> > > > Thanks,
> > > > Mike
> > > >
> > > >
> > > > --- In vantage@yahoogroups.com, Kunal Ganguly <kunal_vantage@> wrote:
> > > > >
> > > > > The second links says that you need to set the CancelEventHandler to
> > true
> > > > >
> > > > > so... in pseudocode
> > > > >
> > > > > private form_closing() handles form.closing
> > > > > [form.]CancelEventHandler = true
> > > > > end sub
> > > > >
> > > > >
> > > > > unless you call calling this sub somewhere else, you really don't
> > need to
> > > > do anything with the args variable.
> > > > >
> > > > > Thanks,
> > > > > Kunal
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: drew.pete <drew.pete@>
> > > >
> > > > > To: vantage@yahoogroups.com
> > > > > Sent: Tue, January 5, 2010 2:35:07 PM
> > > > > Subject: [Vantage] Re: Cancel Form Closing
> > > > >
> > > > >
> > > > > Kunal,
> > > > >
> > > > > Thanks for the links. After comparing both links I couldn't see why
> > the
> > > > following code I have wouldn't work...
> > > > >
> > > > > Private Sub JobEntryForm_ Closing(ByVal sender As object, ByVal args
> > As
> > > > System.ComponentMod el.CancelEventAr gs) Handles JobEntryForm. Closing
> > > > >
> > > > > args.Cancel = true
> > > > >
> > > > > End sub
> > > > >
> > > > > It doesn't error out at all for me - it just doesn't cancel the
> > closing
> > > > of the form.
> > > > >
> > > > > Thanks,
> > > > > Drew
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > [Non-text portions of this message have been removed]
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
> >
> >
>
>
>
> *Waffqle Driggers*
> *High End Dev, System Design, Profit Drinking
> *
> *:: 904.962.2887*
> *:: waffqle@...*
> *:: NO FAXES*
>
> *
>
> *
>
>
> [Non-text portions of this message have been removed]
>
</div> <div style="color:#fff;min-height:0;"></div>