Deklaration: Declare Function FillRect Lib "user32.dll" ( _ ByVal hdc As Long, _ lpRect As RECT, _ ByVal hBrush As Long) As Long Beschreibung: Parameter:
Rückgabewert: Beispiel: Private Declare Function FillRect Lib "user32" ( _ ByVal hdc As Long, _ lpRect As RECT, _ ByVal hBrush As Long) As Long Private Declare Function CreateHatchBrush Lib "gdi32" ( _ ByVal nIndex As Long, _ ByVal crColor As Long) As Long Private Declare Function DeleteObject Lib "gdi32" ( _ ByVal hObject As Long) As Long Private Declare Function InvertRect Lib "user32" ( _ ByVal hdc As Long, _ lpRect As RECT) As Long Private Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type Private Const HS_BDIAGONAL = 3 ' Diagonal von links unten nach rechts oben (/) Private Const HS_CROSS = 4 ' Kreuz (+) Private Const HS_DIAGCROSS = 5 ' Diagonales Kreuz (x) Private Const HS_FDIAGONAL = 2 ' Diagonal von rechts unten nach links oben (\) Private Const HS_HORIZONTAL = 0 ' Horizontal (-) Private Const HS_VERTICAL = 1 ' Vertikal (|) ' Füllen des Fensters mit einem Muster Private Sub Form_Load() Dim Retval As Long, hBrush As Long, hOldBrush As Long, WndRect As RECT Dim FirstColor As Long Me.ScaleMode = vbPixels Me.AutoRedraw = True ' RECT-Struktur mit Fenstergröße füllen With WndRect .Right = Me.ScaleWidth .Bottom = Me.ScaleHeight End With ' Brush erstellen hBrush = CreateHatchBrush(HS_DIAGCROSS, vbGreen) ' Fenster mit einem Muster füllen Retval = FillRect(Me.hdc, WndRect, hBrush) ' Fensterfarbe invertieren Retval = InvertRect(Me.hdc, WndRect) ' erstellten Brush zerstören DeleteObject hBrush End Sub Diese Seite wurde bereits 10.649 mal aufgerufen. |
sevZIP40 Pro DLL Zippen und Unzippen wie die Profis! Mit nur wenigen Zeilen Code statten Sie Ihre Anwendungen ab sofort mit schnellen Zip- und Unzip-Funktionen aus. Hierbei lassen sich entweder einzelnen Dateien oder auch gesamte Ordner zippen bzw. entpacken. 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. |