Deklaration: Declare Function CreatePenIndirect Lib "gdi32.dll" (lpLogPen As LOGPEN) As Long Beschreibung: Parameter:
Rückgabewert: Beispiel: Private Declare Function Chord Lib "gdi32.dll" ( _ ByVal hdc As Long, _ ByVal nLeftRect As Long, _ ByVal nTopRect As Long, _ ByVal nRightRect As Long, _ ByVal nBottomRect As Long, _ ByVal nXRadial1 As Long, _ ByVal nYRadial1 As Long, _ ByVal nXRadial2 As Long, _ ByVal nYRadial2 As Long) As Long Private Declare Function CreatePenIndirect Lib "gdi32.dll" ( _ lpLogPen As LOGPEN) As Long Private Declare Function DeleteObject Lib "gdi32.dll" ( _ ByVal hObject As Long) As Long Private Declare Function SelectObject Lib "gdi32.dll" ( _ ByVal hdc As Long, _ ByVal hObject As Long) As Long Private Type POINTAPI x As Long y As Long End Type Private Type LOGPEN lopnStyle As Long lopnWidth As POINTAPI lopnColor As Long End Type Private Const PS_SOLID = 0 Private Const PS_DASH = 1 Private Const PS_DOT = 2 Private Const PS_DASHDOT = 3 Private Const PS_DASHDOTDOT = 4 Private Const PS_NULL = 5 Private Const PS_INSIDEFRAME = 6 Private Sub Form_Load() Dim Retval As Long, hPen As Long, hOldPen As Long, PenInfo As LOGPEN Me.AutoRedraw = True Me.ScaleMode = vbPixels ' Pen definieren With PenInfo .lopnColor = vbRed .lopnStyle = PS_DASHDOTDOT End With ' Pen erstellen hPen = CreatePenIndirect(PenInfo) ' Pen der Form zuweisen und alten zwischenspeichern hOldPen = SelectObject(Me.hdc, hPen) ' Halbkreis zeichnen Retval = Chord(Form1.hdc, 10, 10, Me.ScaleWidth - 20, Me.ScaleHeight - _ 20, (Me.ScaleWidth - 20) / 2, 10, (Me.ScaleWidth - 20) / 2, _ Me.ScaleHeight - 20) ' Alten Pen wiederherstellen Call SelectObject(Me.hdc, hOldPen) ' erstellten Pen zerstören DeleteObject hPen End Sub Diese Seite wurde bereits 6.348 mal aufgerufen. |
Neu! sevDTA 3.0 Pro SEPA mit Kontonummernprüfung Erstellen von SEPA-Dateien mit integriertem BIC-Verzeichnis und Konto- nummern-Prüfverfahren, so dass ungültige Bankdaten bereits im Vorfeld ermittelt werden können. Buchempfehlung Tipp des Monats Juni 2024 Microsys Kramer Mausrad im Formular abschalten (Access) Deaktiviert das Mausrad in Access-Formularen. 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. |