|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Closing all forms at onceit looks right to me: Dim aForm As Form For Each aForm In Application.OpenForms aForm .Close() Next Where should this be? I put it in form_deactivated() and nothing, same for form_finalize(). In VB6 I believe it was form_closing but that's no longer available in VB.NET. Thanks, Adam Hello, Adam,
You don't say exactly what problem you are experiencing with this, but I suspect that the difficulty is that closing the form removes it from the OpenForms collection, and this in turn disrupts the iteration. Try something like: Do While Application.OpenForms.Count > 0 Close(Application.OpenForms(0)) Loop instead. Cheers, Randy Adam Honek wrote: Show quoteHide quote > I'm using the below code but having little luck even though > it looks right to me: > > Dim aForm As Form > > For Each aForm In Application.OpenForms > > aForm .Close() > > Next > > > > Where should this be? I put it in form_deactivated() and nothing, same for > form_finalize(). > > In VB6 I believe it was form_closing but that's no longer available in > VB.NET. > > > > Thanks, > > Adam > >
Image Resource - not released
DataViews with DataSets 'Incremental Search' of data base or "Wheres the 'Seek' method Visual C to Visual Basic Converstion Help... Reading and Writing Text Files .Net Mail only goes to one Problem with MoveFile command in ASP page register Mouse wheel handler in main VB .net 2005 form Inherent encryption in .NET 2.0? dot.net com class function |
|||||||||||||||||||||||