| | |
convert vb6 code to vb.net
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Mar 2008
Posts: 1
Reputation:
Solved Threads: 0
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
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
![]() |
Similar Threads
- Mapping a hard drive to a treeview ($1.00 to the best answer) (VB.NET)
- How to convert VB6 code to .net code (VB.NET)
- conversion of string into byte (Visual Basic 4 / 5 / 6)
- vb6 to vb.net conversion problems (VB.NET)
- Homework (No i dont want you to do it for me) (Visual Basic 4 / 5 / 6)
- convert from 'ref double[]' to 'ref object' (C#)
Other Threads in the VB.NET Forum
- Previous Thread: [Deleting Database]
- Next Thread: How to close a web form and open a new web form
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
"crystal .net .net2005 2008 access add advanced application array assignment basic box button buttons center click code combo convert cpu data database datagrid datagridview dissertation dissertations dissertationthesis dosconsolevb.net editvb.net employees error excel exists firewall function image images isnumericfuntioncall listview login map math memory mobile module msaccess mssqlbackend mysql navigate net number opacity page pan picturebox picturebox2 port print printing printpreview problem record regex reports" reuse right-to-left save savedialog search serial socket sorting sql sqldatbase storedprocedure string structures studio temp textbox timer txttoxmlconverter upload useraccounts usercontol usercontrol vb vb.net vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet vista visual visualbasic visualbasic.net visualstudio2008 web winsock wpf xml





