J'ai un Porjet nommé : PrjCtl
Un Controle ActiveX nommé : MonControle
Un module nommé : Module1
Une page de propriété nommé : Propriété_Animation
J'ai une picturebox nommé : PicAnimation , sur MonControle et également sur Propriété_Animation .
J'ai placé une fonction dans mon Module1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| '*** Triangle HAUT ***'
Sub TraceTriangleHaut(point_croisement, couleur, decalage_x, decalage_y)
Dim i, f, F1
PicAnimation.ForeColor = couleur
For i = 0 To 80 Step 1
f = i / 80
F1 = 0.5 + f
PicAnimation.Line (point_croisement * F1 + decalage_x, decalage_y)-(point_croisement + decalage_x, point_croisement + decalage_y)
Next i
' Contour
PicAnimation.ForeColor = 0
PicAnimation.Line (point_croisement * 0.5 + decalage_x, decalage_y)-(point_croisement + decalage_x, point_croisement + decalage_y)
PicAnimation.Line (point_croisement * 1.5 + decalage_x, decalage_y)-(point_croisement + decalage_x, point_croisement + decalage_y)
PicAnimation.Line (point_croisement * 1.5 + decalage_x, decalage_y)-(point_croisement * 0.5 + decalage_x, decalage_y)
End Sub |
Dans MonControle et Propriété_Animation , je fait appel à cette fonction
TraceVanneHaut point_croisement, couleur, decalage_x, decalage_y
Mais il faut que je spécifi le chemin de PicAnimation.... Comment faire ??
J'espere cette foi , jmfmarques , avoir était plus clair.
Partager