INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Unable to Close File

Unable to Close File

(OP)
Using the WebBrowser control and some simple HTML, I'm successfully streaming live video from individual cameras on my video server and writing the files to a hard drive.
However, I have been unable to close any of the video files without teminating my programme first.
The sample HTML code states "stop=True" will stop receiving images from the Video Server and close any open files (avi/mpj), but this doesn't have any effect.
I have also tried the VB6 "Stop" command which is supposed to close all open files but that doesn't work either.
Has anybody any other suggestions that I might try.

Experience is something you don't get until just after you need it.

RE: Unable to Close File

Um - where do you get the idea that the Stop statement closes files? The documentation states "The Stop statement suspends execution, but unlike End, it doesn't close any files or clear variables".

(ok, it does

RE: Unable to Close File

(OP)
My mistake, I meant the Close statement. And I also meant to say the files don't close until I terminate VB, not just my programme.

Experience is something you don't get until just after you need it.

RE: Unable to Close File

(OP)
I was wondering, if I know the location path and the filename, is there a way of closing the file without exiting the programme?

Experience is something you don't get until just after you need it.

RE: Unable to Close File

Guessing:

You are writing to a file from a stream. A stream that has no end.

Or you are trying to close the file before the stream has stopped.

Stop writing before closing.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close