Needing assistance converting VB6 to XOJO

We’re ready to convert the code but it hasn’t been easy to find how to do it.

There is code for two classes, three modules, and then connecting them to two designed window forms for testing them.

It just feels impossible, for a beginner. Can I maybe pay someone for some help?

I have 150 at freelancer. Is anyone interested? It would greatly help me, to improve my competency in this language.

Here’s the link that you could apply:

In gist of it there is Rijndael, Huffman, File structure, Cypher control, recursion and a test window for recursion as well as cryptology.

hi brian,
this can be a few rows or 100000 :wink:
at least i used vb6 more than 15 years.
where exactly do you see a problem in convert?

i am looking for a direct explanation of vb6 to XoJo …

one code for example is this

Moderator Note:
The unattributed code posted in this reply has been replaced with a link to the original for the purposes of following both our forum guidelines and the Copyright attached to the linked code.

Thats actually pretty obscure code, even for VB6

What is actually DOES is to search recursively inside a directory, and assembles a list of files that match a file spec, then put info about them into an array.
consider this sample code to copy files or folders… all it takes is a little tweak to NOT do the copy, but instead to add details to an array

Sub CopyFileOrFolder(source As FolderItem, destination As FolderItem)
Var newFolder As FolderItem

If source.IsFolder Then // it’s a folder
newFolder = destination.Child(source.Name)
For Each file As Folderitem In source.Children // go through each item
If file.isFolder Then
// it’s a folder
CopyFileOrFolder(file, newFolder) // recursively call this routine passing it the folder
file.CopyFileTo(newFolder) // it’s a file so copy it
End If
Else // it’s not a folder
End If
End Sub

1 Like

Brian, a lot of this code can be converted directly to Xojo. However, most Xojo programmers would want to know “what” the code does and then re-write in a more “Xojo” way. Xojo has classes, such as the FolderItem class, that might reduce the code needed. Honestly, when I look at this code, I just couldn’t bring myself to convert it line by line as is. For example, most of the Declare’s are probably not needed, although you could convert them to Xojo if you really want to. I know I’m not answering your question. You should probably watch some Xojo tutorial videos or maybe someone can do this for you.

let’s consider that with API we can see around 15k files and 1200 folders a full recursion with file pattern which can match multiple patterns in around 1 second. I am sorry but I just do not know that this sort of speed can be obtained by Xojo to use a rudimentary approach.

You are probably right. It may be necessary to use os api’s to get that speed. There is also FileListMBS.

Maybe you can understand where i’m coming from with regard to that …

But I am also attempting to convert classes and types which I’m unsure

i agree with jeff that it make no sense to try a hardcore convert with old windows api.

xojo have also constants

Type is named Structure in Xojo, you can add with Insert+

Private sArr() As String
could be a “property” with scope private

vbTab is a constant

file access is FolderItem

End Function is not visible, you add a method and to the right you can add a return type

the difficulty with your example source code is more the exact size of windows api structure.

Windows APIs to Xojo data type conversion


it might be easier to convert VB 6 to VB .net

Friendly reminder that this symbol Screen Shot 2021-07-15 at 16.14.46 will turn your code-paste into readable code.

Alternatively, use three backticks: ```

I understand that Xojo provides an app to translate from VB6 to Xojo, but since both products are quite different, IMHO it’s better to reproduce what you have actually by starting with a blank page. For sure to do that you need to have a good understanding of Xojo, but I fear going to the translation way may be worse.

Starting from scratch, will let you learn Xojo the right IMO. If you have someone to guide you, it’s event better.

Just think about those who use a computer - goog… not to name it - to translate text from one language to another and then publish the result. That can lead to a catastrophe.

VB.Net is quite different than VB 6. That would not be easier but for the windows if not done under WPF.

.net have a vb6 class and vs studio ide much more common features than xojo.
for a convert the .net framework is secondary.

1 Like

Private Type FILETIME
dwLowDateTime As Long
dwHighDateTime As Long
End Type

this is tough for me to understand here,
is it class and properties or methods

It’s a structure, but I’m not sure posting copyright code with the copyright removed which expressly forbids that is a good thing to do.

' Distribution: You can freely use this code in your own
'               applications, but you may not reproduce 
'               or publish this code on any web site,
'               online service, or distribute as source 
'               on any media without express permission.

Even if you have express permission to do so, a link to the original code would be more useful/helpful to assist others in converting the code.

VBnet™ Visual Basic Developers Resource Centre (


okay so let’s end it right there.

i’m never worried about posting code, but you think i should be.

Julien, if you feel i’m in jeopardy of copyright infringment, then why don’t i reccomend that you first talk to the copyright office about it.

Far as i’m concerned, you are spreading lies! i have infact contacted them so i will fill you in. there is no copyright protection over code, it’s modules or functions as it’s all an expression of an idea, of which in this case is utilizing something that is for example published to this site you’ve shown. if, for example you would say that a recursion should be copyrightable then you may have to purchase the rights from someone before you can use it? it doesn’t make sense and that is why i even across the seas most code is uncopyrightable, and for good measure. infact maybe you should contact an attorney to get more information to backup your claims.

May I digress? I am asking for answers as to how to use this programming language. I do not expect any of your answers to be copyrighted in that I must pay you for a license to use any solutions provided. I do not expect you to keep anything that I’ve shown you to yourself and that could entail that you may find it an any other website in any given day.

I find your attitude to be contrarily disingenuous and anti-supportive on account of looking to be productive.

Look, I sought out to learn another programming language and nobody is ever talking about copyrighting their code in court here buddy.

Thanks Alot

I can’t even tell you how mad you just made me there

Unfortunately, the author of that code did attach a Copyright notice that expressly forbids reproduction of that code on other sites, whereas code posted here to help you likely will not contain such a condition. The best path would have been to simply link to the code when you don’t have permission to reproduce publicly.

Please don’t take any of this as critical or negative. @anon20074439 was just trying to help you avoid potential issues, and he is right. We also have a forum guideline here that states you should not post code or other content that you do not have permission to post.


It’s just the fact that I am asking for help and I was asked what code I was needing help with and you all are PRO and what not but only complain that it can’t be done so I feel you have no worries about copyright protection and there has to be a logo of copyright protection and there isn’t and there is no being published to a site like publishing to a forum as if you are an actual website. How can you all dog me like this it’s pathetic. Atleast we see that I am pretty much correct in all I have said. It’s also depressing that this programming language is leaving me at this being a newbie. Thanks alot

you cannot post a link to code? why do it then?

One thing that should help you would be to have at look at the Windows Functionality Suite. While it’s fairly old at this point, most (if not all) of the code continues to function as expected. The declares that you’re calling for file system operations, for instance, can be seen in the WFS here.

1 Like

Your problem can’t really be answered here because we can only assist with concrete problems and not conversions of complete apps. Xojo has a form to get help from Xojo developers.