how to "import" the vb project from the text file

  • Thread starter Thread starter Mario Krsnic
  • Start date Start date
Am 12.08.2010 22:54, schrieb Mario Krsnic:
Hello everybody,
I found the interesting sample here:
http://www.java2s.com/Tutorial/VB/0280__GUI-Applications/Filemanager.htm
but I am not able to use it in Visual Studio.
Is there any possibility to import it in the VS from the text file?
When I try to copy the code in the class I get the message "there are many
identical signatures".
Can somebody help me?

Put the whole code into an empty .vb file. Then it works. I've tried it.
I mean, it's compilable; I didn't run it. Though, you don't have three
separate designable Forms then.


Well, it worked after fixing two problems that one has with Option Strict On:

Sub tvDir_AfterSelect:
freespace /= 1000000

changed to

freespace \= 1000000 'Integer division

Sub OpenFile:
FileForm.txtContent.Lines = lines.ToArray(Type.GetType("System.String"))

changed to

FileForm.txtContent.Lines = DirectCast(lines.ToArray(GetType(String)), String())


Or, with the latter problem, replace it by a List(Of String). But that's another
story. (or use File.ReadAllLines...)
 
Back
Top