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.628 mal aufgerufen. |
Neu! sevCommand 4.0 Professionelle Schaltflächen im modernen Design! Mit nur wenigen Mausklicks statten auch Sie Ihre Anwendungen ab sofort mit grafischen Schaltflächen im modernen Look & Feel aus (WinXP, Office, Vista oder auch Windows 8), inkl. große Symbolbibliothek. Buchempfehlung Tipp des Monats März 2024 Dieter Otter UTF-8 Konvertierung von Dateien und Strings VB6 selbst verfügt über keine Funktionen zur UTF-8 Konvertierung von Daten. Mit Hilfe des ADODB.Stream-Objekts lassen sich diese fehlenden Funktionen aber schnell nachrüsten. 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. |