Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7617563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:10:55+00:00 2026-05-31T03:10:55+00:00

Another migration question, I have another chunk of VB6 code that seems to need

  • 0

Another migration question,

I have another chunk of VB6 code that seems to need some workaround for .NET. For a shortened version, this is all it is doing:

Open sFileName For Output As #1
Print #1,
Print #1, "Facility:" & vbTab & Replace(Frame1.Caption, ",", " ")
Print #1, 
Print #1, "Address:" & vbTab & Replace(Me.lblAddr1.Caption, ",", " ")
Print #1, "City/State:" & vbTab & Replace(Me.lblAddr2.Caption, ",", " ")

And so on, and so forth. You can see it keeps repeating itself to create new lines. The question is, is how do I implement the same thing in .NET? Thanks for all the help guys.

Logan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T03:10:56+00:00Added an answer on May 31, 2026 at 3:10 am
     Imports System
     Imports System.IO
     Imports System.Text
     Imports System.Collections.Generic
    
     Class Program
    
        Public Shared Sub Main(ByVal args As String())
    
        Dim mydocpath As String = _
        Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
        Dim sb As New StringBuilder()
    
        For Each txtName As String _
            In Directory.EnumerateFiles(mydocpath, "*.txt")
            Using sr As New StreamReader(txtName)
                sb.AppendLine(txtName.ToString())
                sb.AppendLine("= = = = = =")
                sb.Append(sr.ReadToEnd())
                sb.AppendLine()
                sb.AppendLine()
    
            End Using
        Next
    
        Using outfile As New StreamWriter(mydocpath & "\AllTxtFiles.txt", Encoding.Default)
            outfile.Write(sb.ToString())
        End Using
        End Sub
     End Class
    

    http://msdn.microsoft.com/en-us/library/6ka1wd3w.aspx#Y0

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Another basic Rails question: I have a database table that needs to contain references
I have a migration that will dynamically create tables on fly per date. Something
I have written a very complex database migration script in Groovy, that runs just
I'm migrating some websites over to another server. One of the websites is built
Does anyone have any experience migrating from one DBMS to another? If you have
Another easy one hopefully. Let's say I have a collection like this: List<DateTime> allDates;
Another poster asked about preferred syntax for infinite loops . A follow-up question: Why
Another question asked about determining odd/evenness in C, and the idiomatic (x & 1)
I am migrating data from one model version to another in the iPhone, but
I have one data model 'object' with fields->object_id, object_name. That is: http://localhost:3000/objects/ I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.