IsDisposed is inherited from the Control Class.
Maybe something like this is what you need then:
If CType(oMyForm, Control).IsDisposed then
'do something
end if
hope this helps..
Imran.
"rob willaar" <(E-Mail Removed)> wrote in message
news:412644aa$0$78749$(E-Mail Removed)...
> Hi Imran,
>
> Tnx for your reply.
>
> I don't seem to have a .IsDisposed property on a reference to a form in
> framework 1.1
> This app will have a lot of forms so i don't like to have globals
>
>
> "Imran Koradia" <(E-Mail Removed)> schreef in bericht
> news:(E-Mail Removed)...
> > You have the IsDisposed property in 1.1 as well. However, the difference
> > here is that you will need a reference to the instance of the form
unlike
> in
> > 2.0 where you can just call the class name as you would do in VB 6.0.
> >
> > However, I'm not sure if IsDisposed is the best way to determine whether
a
> > form is closed or not. Its better to use the Closed event of the form
> within
> > which you can set some boolean indicating that the form has been closed.
> >
> > for example:
> > Private bFormClosed as boolean = False
> >
> > private sub Form1_Load(byval sender as System.Object, byval e as
> > System.EventArgs) _
> > Handles Form1.Load
> > bFormClosed = False
> > end sub
> >
> > private sub Form1_Closed(byval sender as System.Object, byval e as
> > System.EventArgs) _
> > Handles Form1.Closed
> > bFormClosed = True
> > end sub
> >
> > then check the bFormClosed variable to determine whether the form is
> closed
> > or not.
> >
> > hope this helps..
> > Imran.
> >
> > "rob willaar" <(E-Mail Removed)> wrote in message
> > news:412636f8$0$36861$(E-Mail Removed)...
> > > Hi,
> > >
> > > How can i check is a form is disposed in framework 1.1
> > > In framework 2.0 i can check Form.IsDisposed to check if a user closed
> the
> > > form
> > >
> > >
> > >
> > >
> >
> >
>
>
|