Deklaration: Declare Function CreatePolyPolygonRgn Lib "gdi32.dll" ( _ lpPoint As POINT_TYPE, _ lpPolyCounts As Long, _ ByVal nCount As Long, _ ByVal nPolyFillMode As Long) As Long Beschreibung: Parameter:
nPolyFillMode Konstanten: Const ALTERNATE = 1 ' Alternative zwischen gefüllt und ungefüllt, je nach dem welches die Randfarbe ist Const WINDING = 2 ' Die Region wird komplett gefüllt. Rückgabewert: Beispiel: Private Declare Function CreatePolyPolygonRgn Lib "gdi32.dll" ( _ lpPoint As POINTAPI, _ lpPolyCounts As Long, _ ByVal nCount As Long, _ ByVal nPolyFillMode As Long) As Long Private Declare Function DeleteObject Lib "gdi32.dll" ( _ ByVal hObject As Long) As Long Private Declare Function InvertRgn Lib "gdi32.dll" ( _ ByVal hdc As Long, _ ByVal hRgn As Long) As Long Private Type POINTAPI x As Long y As Long End Type ' CreatePolyPolygonRgn/SetPolyFillMode nPolyFillMode-Konstanten Private Const ALTERNATE = 1 ' Alternative zwischen gefüllt und ungefüllt, je nach dem welches die Randfarbe ist Private Const WINDING = 2 ' Die Region wird komplett gefüllt. ' Multiple Region erstellen Private Sub Form_Load() Dim hRegion As Long, Points(7) As POINTAPI, Figures(1) As Long Me.ScaleMode = vbPixels Me.AutoRedraw = True ' Figur 1 With Points(0) .x = 10 .y = 10 End With With Points(1) .x = Me.ScaleWidth - 10 .y = 10 End With With Points(2) .x = Me.ScaleWidth / 2 .y = Me.ScaleHeight / 2 End With With Points(3) .x = 10 .y = 10 End With Figures(0) = 4 ' Figur 2 With Points(4) .x = 10 .y = Me.ScaleHeight / 2 End With With Points(5) .x = Me.ScaleWidth - 10 .y = Me.ScaleHeight / 2 End With With Points(6) .x = Me.ScaleWidth / 2 .y = Me.ScaleHeight End With With Points(7) .x = 10 .y = Me.ScaleHeight / 2 End With Figures(1) = 4 hRegion = CreatePolyPolygonRgn(Points(0), Figures(0), 2, WINDING) Call InvertRgn(Me.hdc, hRegion) Call DeleteObject(hRegion) End Sub Diese Seite wurde bereits 6.677 mal aufgerufen. |
sevWizard für VB5/6 Professionelle Assistenten im Handumdrehen Erstellen Sie eigene Assistenten (Wizards) im Look & Feel von Windows 2000/XP - mit allem Komfort und zwar in Windeseile :-) Buchempfehlung Tipp des Monats April 2024 Skyfloy Chart von Microsoft und dazu noch gratis Tutorial für Microsoft Chart Controls für Microsoft .NET Framework 3.5 Access-Tools Vol.1 Über 400 MByte Inhalt Mehr als 250 Access-Beispiele, 25 Add-Ins und ActiveX-Komponenten, 16 VB-Projekt inkl. Source, mehr als 320 Tipps & Tricks für Access und VB |
||||||||||||||||||
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein. |