It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
avatar
orcishgamer: VB or VB.NET?
VB is still used without .NET nowadays?
Post edited February 09, 2013 by Fenixp
avatar
orcishgamer: VB or VB.NET?
avatar
Fenixp: VB is still used without .NET nowadays?
Yeah, people run legacy code, sadly. Fuck, I had to come up with some specs so some guy's Powerbuilder shit could call an up-to-date system. Simple REST is what I went with.

Dunno why a uni is teaching VB or VB.NET these days, regardless, seems insane, but you know.
Post edited February 09, 2013 by orcishgamer
avatar
Detlik: Good day to every single one of you,
Big surprise, I screwed yet something else up. I somewhat advanced in my studies of Visual Basic, but apparently its not good enough, since I require assistance. In my school we have assignment to make our version of Total Commander/File Manager, and I have trouble putting up together. I am not asking for someone to put it up together for me, because what would be the point of that? All I am asking is if there is someone here skilled in Visual Basic, who would be able to provide me with advice, answers to my questions and maybe even teach me things or two.

If I had some money I would held up a contest for GOG games or other, but unfortunately I don't have cash, so all I can offer is my gratitude and/or tons of copies of DOTA 2
avatar
orcishgamer: VB or VB.NET?
VB.NET 2010 through Microsoft Visual Studio Ultimate 2010
avatar
orcishgamer: VB or VB.NET?
avatar
Detlik: VB.NET 2010 through Microsoft Visual Studio Ultimate 2010
Hmm, I'm a terrible choice to help with that, with that said, if you have a specific question, search Stackoverflow (or Stackexchange), if you don't see a solution you can post a question (again specific), just be up front that you are learning and this involves an assignment.
avatar
orcishgamer: VB or VB.NET?
avatar
Detlik: VB.NET 2010 through Microsoft Visual Studio Ultimate 2010
My top tip for you. Write it in c#, then get some decompiler like "IL spy" or Jet Brains' "dotPeek" to convert it to VB.NET. C# is much easier to learn, has better tooling, more examples, and will stand you in much better stead for a job once you're done with your course.
avatar
Detlik: VB.NET 2010 through Microsoft Visual Studio Ultimate 2010
avatar
wpegg: My top tip for you. Write it in c#, then get some decompiler like "IL spy" or Jet Brains' "dotPeek" to convert it to VB.NET. C# is much easier to learn, has better tooling, more examples, and will stand you in much better stead for a job once you're done with your course.
Its not course, its high school, and I plan on working with C#, but this assignments deadline is progressing at scary rate so I don't think I have time to learn C# (but I might do it for future ones, thanks)

Awesome! The problem is solved.

Public Sub VSouboru(ByVal Diskator As String, ByVal Listboxator As ListBox)
Dim dir As New DirectoryInfo(Diskator)
For Each subdir As DirectoryInfo In dir.GetDirectories()
VSouboru(subdir.FullName, Listboxator)
Listboxator.Items.Add(subdir.FullName)
Next
End Sub

I just removed the VSouboru line which caused recursion and now I can browse all file paths with it...all right now just to try my luck with Copy, Move, Delete, Rename, Create folders and files and search bar, and of course the dreaded file editor, and I am all set. Will post questions and my problems as soon as I will have them (therefore very soon)
Post edited February 09, 2013 by Detlik
avatar
wpegg: My top tip for you. Write it in c#, then get some decompiler like "IL spy" or Jet Brains' "dotPeek" to convert it to VB.NET. C# is much easier to learn, has better tooling, more examples, and will stand you in much better stead for a job once you're done with your course.
avatar
Detlik: Its not course, its high school, and I plan on working with C#, but this assignments deadline is progressing at scary rate so I don't think I have time to learn C# (but I might do it for future ones, thanks)
I know, and for a scary deadline it doesn't help. The thing to understand is that they are the ultimately the same thing. they both compile to the same interpretted language, so if you want to use some C# in a VB.NET project, it is easily convertable.
I am trying to make copying directories work, but instead of the directory itself just its contents are copied (For example Folder A contains Folder B and File C, when I copy it, then to the targeted directory are copied Folder B and File C, but without Folder A...almost as if Folder A would be .rar file and its contents would be extracted.

Code :
Sub Kopitator(ByVal Slozka, ByVal Cesta)
My.Computer.FileSystem.CopyDirectory(Slozka.ToString, Cesta.ToString, False)
End Sub

Private Sub ZkopirujSlozku_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ZkopirujSlozku.Click
Dim Kopiruj As New PraceSeSlozkami
Dim nacti As New Nacitani
Dim umisteni As String
umisteni = New DirectoryInfo(Listboxator.SelectedItem.ToString).FullName
Kopiruj.Kopitator(umisteni, Cesta69.Text.ToString)
Listboxator.Items.Clear()
nacti.VSouboru(Cesta.Text.ToString, Listboxator, Cesta)
Listboxator69.Items.Clear()
nacti.VSouboru(Cesta69.Text.ToString, Listboxator69, Cesta)
End Sub

(dont mind nacti and nacitani, that is for refresh which works flawlessly)
this may shed some light

http://msdn.microsoft.com/en-us/library/ms127957.aspx

actually this is better, as includes the original directory, not just the contents

http://msdn.microsoft.com/en-us/library/xz2d9afk.aspx
Post edited February 10, 2013 by Ian
I read it but I am no wiser. All that is left is make copying/moving directories work properly, do the search function and simple file editor...and then tweak out the program and put some nice looks into it.
Since FileSystem.CopyDirectory "Copies the contents of a directory to another directory", You're only copying Folder A's contents (Folder B and File C) into the destination.
You'd probably just need to add the source dirs name to the destination path (so a directory with the source name is first created in the destination, and then the contents get copied into that).

So maybe modify this line:
avatar
Detlik: Kopiruj.Kopitator(umisteni, Cesta69.Text.ToString)
With something like this:
Kopiruj.Kopitator(umisteni, Cesta69.Text.ToString + "\" + New DirectoryInfo(Listboxator.SelectedItem.ToString).Name)
Its solved now thanks to idea my friend gave me and the path idea from MoP, I simply extracted just the directory name, pasted it behind the name of location where the folder should be copied/moved and created new directory with said name there and extracted files to it.

Now all that is needed is file editor, search bar and then some polishing.
On unrelated note, when I create new file I cant manipulate it and I get exception that the file is in use by vshost32.exe (when trying to delete it, rename it, copy it, simply do anything with it or move folder that has it in)

Is there anything that can be done with it?