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.684 mal aufgerufen. |
TOP! Unser Nr. 1 Neu! sevDataGrid 3.0 Mehrspaltige Listen, mit oder ohne DB-Anbindung. Autom. Sortierung, Editieren von Spalteninhalten oder das interaktive Hinzufügen von Datenzeilen sind ebenso möglich wie das Erstellen eines Web-Reports. Buchempfehlung Tipp des Monats Mai 2024 Hermann Röttger Wochentage eines Datumsbereichs ermitteln Wochentage eines Datumsbereichs ermitteln, optional mit Feiertagsberechnung TOP Entwickler-Paket TOP-Preis!! Mit der Developer CD erhalten Sie insgesamt 24 Entwickler- komponenten und Windows-DLLs. Die Einzelkomponenten haben einen Gesamtwert von 1605.50 EUR... |
||||||||||||||||||
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. |