VB.net geeks in here please

Soldato
Joined
5 Aug 2006
Posts
4,261
Right im making a simple application for my mums laptop to backup her files and stuff.

Anyway, since im very new and no good at VB.net i opted for using FileSystemObject to do the work for me.

So bearing that in mind is it possible (from searching the net i suspect not) to link its progress to a progress bar?
 
Here is a sample in C#. Obviously it is not VB but you should get the idea. And using System.IO instead of the FileSystemObject is much easier.

I was under the impression if you want to copy a folder structure reclusivly or however you spell it it was a bit more effort (which as you can see from doing it the way I've done it its only taken a few lines of code)

Yes you can. I take it you will be using the FileSystemObject to move files from one location to another? If so then get a count of the number of files to be moved/copied. then set you progress bar maximun to the file count. After a file is moved/copied increase the progress bar values by 1.

TrUz

Yes i will.

Im gonna look it up now but in case i cant work it out myself how/what fso method (or another way prehaps) will count the number of files ?

cheers dudes

alec
 
I've been scratching my head and trying, but I cant work it out so I'll have to ask.

How exactly would get the progress bar to relate to the files transferd. does not have to be accurate, so simply by working out how many files have been copied and still have to be will be enough.

Thank you for helping me out.
 
Grr, well it turns out i probably did have it working, but it turns out when do the fso copy the application is none responsive so once its in progress regardless of what i might do (for example change style of progress bar to marque) it wont actually happen until its done!

well thanks a million people - at least i know for future reference i suppose!



now on to my next job.. creating schedule tasks programmatically.. hmm lol
 
Cool. Shall look into it, although im no longer using FSO method, using My.Computer.FileSystem.

I would have used that in the first place if i knew it exsisted! not as documented (it would appear) as some other ways of doing it!
 
Thanks again guys, Bearing in mind the other day was the first time i've ever propperly used VB.net so im still learning! quite fun actualy.

Project is currently sitting at 78 (how pathetic!) lines of code.

Looking very new and crude

http://homepage.ntlworld.com/frances.hewitt1/Pictures/SimpleBackup1.1.0.0.PNG

Still a long long way to go! :) but its a been fun learning!

Probably another 2 weeks before a releasable version is availble! not that anyone beside my mother will use it!


*edit*

please excuse my poor grammer, layout and spelling in that screenshot - its not gonna look pretty for a long time - just coding it atm
 
Back
Top Bottom