FileStream closed when dialog shown

  • Thread starter Thread starter George
  • Start date Start date
G

George

I have a class for a simple dialog.

I added two methods to open and close a FileStream.
The FileStream handle is kept as a member of the dialog class.

The method work when called back to back.

If I all ShoWDialog between these calls the member variable goes to
null.

Any idea what's going on? The member variable is not used anywhere
else in the class.

If I move the Stream open and close to the class above it works fine.
I just lose the stream when it's in the dialog class as soone as the
form is shown.

Please email if possible. Thanks !!!
 
* (e-mail address removed) (George) scripsit:
I added two methods to open and close a FileStream.
The FileStream handle is kept as a member of the dialog class.

The method work when called back to back.

If I all ShoWDialog between these calls the member variable goes to
null.

Any idea what's going on? The member variable is not used anywhere
else in the class.

If I move the Stream open and close to the class above it works fine.
I just lose the stream when it's in the dialog class as soone as the
form is shown.

Please post the source code of the class (the important parts).

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
 
Back
Top