Getting File Length Problem
hey all, if someone note that, but in last few days i asked for help with FTP connection and FTP Downloading without freezing the system, i solved all of that by my self already, but now, when i trying to get a some FTP File Length, it says some some kind of weird error..
here is a shot:
http://www.geocities.com/sergey_321/2.JPG
all the things that i did so far, are working perfectly but not that one..
Re: Getting File Length Problem
That's not weird error. Some streams can seek and some can't. To determine the length of a stream, the position must go from the beginning to the end. For streams that are forward only this would mean you couldn't then use any data it contained, so the operation is not allowed. You can test the CanSeek property to determine whether a stream supports operations that require the ability to seek.
Re: Getting File Length Problem
CanSeek? im kinda starter with visual basic so i didnt used that before..
can u tell me how it works?
i've just checked the command and its returns a boolean.. whats that means? :P
Re: Getting File Length Problem
CanSeek is a ReadOnly property that indicates whether the stream supports seek operations, which basically means random access. If CanSeek is true then the stream does support seek operations, while False means the opposite. A stream must support seek operations in order for you to determine the Length because a forward-only stream won't know it's Length until it gets to the end.
Re: Getting File Length Problem
err.. ok then, i have tryed to make a progress bar that will download a file until it will get to 100% of progress bar.. i have used file Length to check the full file size to know how much percent left me to download the file.. i guess THAT thing is failed; does someone can tell me if there is another way to make a progress bar? like loading buffer class or something.. :s