johnnous
Messages postés100Date d'inscriptionjeudi 3 mars 2005StatutMembreDernière intervention24 mai 2013
-
4 nov. 2008 à 08:08
jrivet
Messages postés7392Date d'inscriptionmercredi 23 avril 2003StatutMembreDernière intervention 6 avril 2012
-
4 nov. 2008 à 10:14
Bonjour
je suis en train de porté un source VB6 en VB.net
j'ai cette source qui fonction sous VB6 mais pas VB.net
MyScale = Array(0, 0, 0)
sous VB.net
erreur de compil Error 1 'Array' is a type and cannot be used as an expression. D:\Dev\La3D\VbNet\VRMLCtl\TestVRMLCtl\WindowsControlLibrary1\Ctl_VRML.vb 51 23 VRMLCtl
Public MyScale As SFVec3f
et j'avais sous VB6
Public Sub ShowPart(witchPart As String, state As Boolean)
Set MyScale = UserControl.Cortona.Engine.Nodes(witchPart).Fields("scale")
If state Then
MyScale.value = Array(1, 1, 1)
Else
MyScale.value = Array(0, 0, 0)
End If
End Sub
mais maintenant sous VB.net je n'arrive pas
erreur de compil Error 1 'Array' is a type and cannot be used as
an expression.
D:\Dev\La3D\VbNet\VRMLCtl\TestVRMLCtl\WindowsControlLibrary1\Ctl_VRML.vb
51 23 VRMLCtl
johnnous
Messages postés100Date d'inscriptionjeudi 3 mars 2005StatutMembreDernière intervention24 mai 2013 4 nov. 2008 à 09:49
C'est bon j'ai trouve
Public Sub ShowPart(ByVal witchPart As String, ByVal state As Boolean)
Dim RetScale0 As Single() = {0, 0, 0}
Dim RetScale1 As Single() = {1, 1, 1}
MyScale = Cortona.Engine.Nodes(witchPart).Fields("scale")
If state Then
MyScale.value = RetScale1 ' en vb6 Array(1, 1, 1)
Else
MyScale.value = RetScale0
End If
End Sub
par contre il n'y a pas mieux ? on ne peut pas le mettre en direct ?
merci pour ton aide