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.315 mal aufgerufen. |
sevAniGif (VB/VBA) Anzeigen von animierten GIF-Dateien Ab sofort lassen sich auch unter VB6 und VBA (Access ab Version 2000) animierte GIF-Grafiken anzeigen und abspielen, die entweder lokal auf dem System oder auf einem Webserver gespeichert sind. 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. |