convert vb6 code to vb.net

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2008
Posts: 1
Reputation: webtrade is an unknown quantity at this point 
Solved Threads: 0
webtrade webtrade is offline Offline
Newbie Poster

convert vb6 code to vb.net

 
0
  #1
Mar 25th, 2008
If anyone can help me convert this snipet of code to vb.net I would greatly appreciate it. Thanks in advance.
webtrade

Dim not_first_symbol As Boolean
Dim symbol As String
Dim query_url As String

Dim response As Variant
Dim quotes As String
Dim fnum As Integer
Dim whole_file As String
Dim lines As Variant
Dim one_line As Variant
Dim num_rows As Long
Dim num_cols As Long
Dim the_array() As String
Dim R As Long
Dim C As Long






MousePointer = vbHourglass

DoEvents

' Prepare a URL to get the quotes.
If USE_TEST_FILE Then
response = LoadTestFile
Else
query_url = "http://quote.yahoo.com/download/quotes.csv?format=sl&ext=.csv&symbols="
For i = 1 To 15
symbol = LCase$(Trim$(ini(i, 2, pAcctdesc)))
If Len(symbol) > 0 Then
If not_first_symbol Then _
query_url = query_url & ","
query_url = query_url & symbol
not_first_symbol = True
End If
Next i

' Open the URL.
response = inetQuotes.OpenURL(query_url)
End If

' Display the response.

MousePointer = vbDefault
whole_file = response
lines = Split(whole_file, vbCrLf)
num_rows = UBound(lines)
one_line = Split(lines(0), ",")
num_cols = UBound(one_line)
ReDim the_array(num_rows, num_cols)

' Copy the Data into the array.
For R = 0 To num_rows
one_line = Split(lines(R), ",")
For C = 0 To num_cols
On Error Resume Next


the_array(R, C) = one_line(C)
Next C
Next R
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC