Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
 
TitleConvert VB6 projects to VB5 projects easily
KeywordsVB6 to VB5, convert, version
CategoriesSoftware Engineering, Miscellany
 
Remove lines starting with these strings (ignoring case) from the project file:

  • retained
  • threadingmodel
  • debugstartupoption

This program does that to the file passed as a command line parameter. Compile it into an executable and put a link to the program in the SendTo directory with the name VB5toVB6. Look at these directories:

  • \WinNT\SendTo
  • \WinNT\Profiles\user_name\SendTo
  • \Windows\SendTo

Now you can right click on the project file and send it to this program to have it converted into VB5 format.

Thanks to Alexander. Putting this in the SendTo menu is a great idea!

 
Private Sub Form_Load()
    Open Command For Input As #1
    Do
        Line Input #1, LineText
        LeesVBP.Add LineText
    Loop Until EOF(1)
    Close 1
    Open Command For Output As #1
    TotalLines = LeesVBP.Count
        For Teller = 1 To TotalLines
            If LCase$(Left$(LeesVBP.Item(Teller), 8)) = _
                "retained" Then
            ElseIf LCase$(Left$(LeesVBP.Item(Teller), 14)) _
                = "threadingmodel" Then
            ElseIf LCase$(Left$(LeesVBP.Item(Teller), 18)) _
                = "debugstartupoption" Then
            Else
                Print #1, LeesVBP.Item(Teller)
            End If
        Next Teller
    Close 1
    Beep
    End
End Sub
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated