|
|
|
Click here to copy the following block | Private Const ALTERNATE = 1 Private Const WINDING = 2
Private Type POINTAPI x As Long y As Long End Type
Private Declare Function SetPolyFillMode Lib "gdi32" (ByVal hdc As Long, ByVal nPolyFillMode As Long) As Long Private Declare Function GetPolyFillMode Lib "gdi32" (ByVal hdc As Long) As Long Private Declare Function Polygon Lib "gdi32" (ByVal hdc As Long, lpPoint As POINTAPI, ByVal nCount As Long) As Long Private Sub Form_Paint() Dim PolyPoints(1 To 5) As POINTAPI, Cnt As Long Const PentagramWidth As Long = 150 PolyPoints(1).x = PentagramWidth / 2 PolyPoints(1).y = 0 PolyPoints(2).x = (PentagramWidth / 4) * 3 PolyPoints(2).y = PentagramWidth PolyPoints(3).x = 0 PolyPoints(3).y = PentagramWidth / 3 PolyPoints(4).x = PentagramWidth PolyPoints(4).y = PentagramWidth / 3 PolyPoints(5).x = PentagramWidth / 4 PolyPoints(5).y = PentagramWidth Me.FillStyle = vbSolid Me.FillColor = vbRed If GetPolyFillMode(Me.hdc) <> WINDING Then SetPolyFillMode Me.hdc, WINDING Polygon Me.hdc, PolyPoints(1), 5 For Cnt = 1 To 5 PolyPoints(Cnt).x = PolyPoints(Cnt).x + PentagramWidth + 20 Next Cnt SetPolyFillMode Me.hdc, ALTERNATE Polygon Me.hdc, PolyPoints(1), 5 End Sub |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|