Jump to content

Recommended Posts

Posted

Here's my code

 

http://ms-os.com/Themes/AlmostGlass/images/icon-quote.gif

code wrote:
Dim ofd As OpenFileDialog = Me.OpenFileDialog1

******* If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then

*********** Dim sr As New StreamReader(ofd.FileName)

*********** Dim currentLine As String = String.Empty

*********** Dim infoArr(0) As String

*********** Dim index As Integer = -1

*********** While sr.Peek -1

*************** index += 1

*************** Array.Resize(infoArr, infoArr.Length + 1)

*************** infoArr(index) = sr.ReadLine()

*************** 'Console.WriteLine(currentLine)

*********** End While

*********** sr.Close()

*********** sr.Dispose()

 

*********** For Each info As String In infoArr

*************** Try

******************* Dim newKey As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Soft Name\Key", True)

******************* newKey.SetValue(info.Substring(0, info.IndexOf(":")), info.Substring(info.IndexOf(":") + 1))

******************* Me.lbInfoList.Items.Add(Me.txtEmail.Text)

******************* newKey.Close()

*************** Catch ex As Exception

*************** End Try

*********** Next

*********** MsgBox("Your info was imported!", MsgBoxStyle.Information)

******* End If

 

When I try import a txt file with 70,000 lines, the program goes to (Not Responding) and it asks me if I want to close vshots.exe....whats a good way to import a lot of data into the registry?

 

Much thanks.

 

 

More...

 

View All Our Microsoft Related Feeds

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...