1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| Private Type POINTAPI
X As Long
Y As Long
End Type
Private Declare Function Polygon Lib "gdi32" (ByVal hdc As Long, lpPoint As POINTAPI, ByVal nCount As Long) As Long
Private Sub Form_Load()
Set affi = Picture1
affi.Scale (1200000, 1300000)-(1300000, 1200000)
'dessine un carré rouge:
affi.Line (1265463.25, 1256754.94)-(1289832.65, 1288125.05), vbRed, BF
ReDim lpPoints(2) As POINTAPI
lpPoints(0).X = 1217654.26: lpPoints(0).Y = 1210458.31
lpPoints(1).X = 1225489.65: lpPoints(1).Y = 1240005.48
lpPoints(2).X = 1238715.69: lpPoints(2).Y = 1224806.32
affi.ForeColor = vbBlack
affi.FillColor = vbBlue
'dessine un triangle bleu:
Res& = Polygon(affi.hdc, lpPoints(0), 2&)
affi.Refresh
end sub |
Partager