Deklaration: 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 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) ' Neuen Pen der Form zuweisen und alten Pen 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 8.649 mal aufgerufen. |
vb@rchiv CD Vol.6 Geballtes Wissen aus mehr als 8 Jahren vb@rchiv! Online-Update-Funktion Entwickler-Vollversionen u.v.m. 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 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. |
||||||||||||||||||||||||||||
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. |