Bonjour,

Je souhaiterai convertir le code suivant vers du vb.net.

Quelqu'un pourrait il m'aiguiller?

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
'Parse la page HTML pour récupérér l'info
	
Private Function GetStock(ByRef sEquity As String) As String
Dim s As String Dim l As Integer Dim lBegin As Integer Dim lEnd As Integer Dim sLast As String Dim sPct As String
If Not htmlDoc Is Nothing Then
s = htmlDoc.documentElement.innerHTML l = InStr(1, s, "TABLEAU COURS") + 1 l = InStr(l, s, sEquity) If l > 0 Then
s = Mid(s, l, 250)
lBegin = InStr(1, s, "<TD align=right")
lBegin = InStr(lBegin, s, ">") lEnd = InStr(lBegin, s, "<") sLast = Mid(s, lBegin + 1, lEnd - lBegin - 1)
lBegin = InStr(lEnd, s, "SPAN class") lBegin = InStr(lBegin, s, ">") lEnd = InStr(lBegin, s, "<") sPct = Mid(s, lBegin + 1, lEnd - lBegin - 1)
GetStock = FormatStockInfo(sEquity, sLast, sPct)
Else
GetStock = sEquity & " : Nothing Found !"
End If
End If
Return GetStock End Function
Merci pour votre aide.