Bonjour, on me transmet des sources vb
des commes on en fait plus.....
mais ces sources sont ne sont pas dans un projet visual basic 6 ou autres
on me demande de les utiliser mais je ne sais pas par ou commencer
j'ai cherché des 'transformateur' de code mais sans succès
J'ai essayé d'inclure ces sources dans une classe vb .net directement
mais ne connaissant pas vb je comprend rien aux fonctions...
help!!!!
ca ressemble à ca:
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
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55 Dim chd$, sStop$, sStart$, outString$, altString$ Dim mCheck As Boolean Dim mChaineIn As String Private Sub do11() ' CODE 11 sStart$ = "(" ' this is the start character sStop$ = ")" ' this is the stop character chd$ = "" chn1 = 0 chn2 = 0 If mCheck Then ' calculate check digit xx$ = x$ n = Len(xx$) j = 1 For i = n To 1 Step -1 Y$ = Mid$(xx$, i, 1) If Y$ <> "-" And (Y$ < "0" Or Y$ > "9") Then outString$ = "Error in code" Exit Sub End If If Y$ = "-" Then z = 10 Else z = Asc(Y$) - 48 ' value of character chn1 = chn1 + j * z j = j + 1 If j > 10 Then j = 1 Next i t = chn1 Mod 11 If t < 10 Then chd$ = chd$ + Chr$(t + 48) ' convert to ASCII character 0-9 Else chd$ = chd$ + "-" End If If (n > 10) Then xx$ = xx$ + chd$ ' the first check digit is included in the calculation of the second j = 1 For i = n + 1 To 1 Step -1 Y$ = Mid$(xx$, i, 1) If Y$ = "-" Then z = 10 Else z = Asc(Y$) - 48 ' value of character chn2 = chn2 + j * z j = j + 1 If j > 9 Then j = 1 Next i t = chn2 Mod 11 If t < 10 Then chd$ = chd$ + Chr$(t + 48) ' convert to ASCII character 0-9 Else chd$ = chd$ + "-" End If End If End If outString$ = sStart$ + x$ + chd$ + sStop$ ' this is the string to output End Sub
Partager