Deklaration: Declare Function AngleArc Lib "gdi32.dll" ( _ ByVal hdc As Long, _ ByVal x As Long, _ ByVal y As Long, _ ByVal dwRadius As Long, _ ByVal eStartAngle As Single, _ ByVal eSweepAngle As Single) As Long Beschreibung: Parameter:
Rückgabewert: Beispiel: Private Declare Function AngleArc Lib "gdi32.dll" ( _ ByVal hdc As Long, _ ByVal x As Long, _ ByVal y As Long, _ ByVal dwRadius As Long, _ ByVal eStartAngle As Single, _ ByVal eSweepAngle As Single) As Long Private Declare Function GetArcDirection Lib "gdi32" (ByVal hdc As Long) As Long Private Declare Function SetArcDirection Lib "gdi32" ( _ ByVal hdc As Long, _ ByVal ArcDirection As Long) As Long Private Declare Function ArcTo 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 MoveToEx Lib "gdi32.dll" ( _ ByVal hdc As Long, _ ByVal x As Long, _ ByVal y As Long, _ lpPoint As POITAPI) As Long Private Type POITAPI x As Long y As Long End Type ' Get- /SetArcDirection Rückgabe-/ArcDirection-Konstanten Private Const AD_CLOCKWISE = 2 ' mit dem Uhrzeigersinn Private Const AD_COUNTERCLOCKWISE = 1 ' gegen den Uhrzeigersinn ' eine Brücke zeichnen Private Sub Form_Load() Dim Retval As Long, PT As POITAPI ' Richtung des Zeichnens setzen If GetArcDirection(Me.hdc) = AD_CLOCKWISE Then Retval = SetArcDirection(Me.hdc, AD_COUNTERCLOCKWISE) End If With Me .AutoRedraw = True .ScaleMode = vbPixels ' Startpunkt definieren (rechte Fenstermitte) Call MoveToEx(Me.hdc, .ScaleWidth - 20, .ScaleHeight / 2, PT) ' ersten Bogen malen (oben) Retval = AngleArc(.hdc, ScaleWidth / 2, .ScaleHeight / 2, _ .ScaleHeight / 2 - 20, 0, 180) ' Richtung zum Zeichnen des Bogens ändern Retval = SetArcDirection(Me.hdc, AD_CLOCKWISE) ' zweiten Bogen zeichnen (unten) Retval = ArcTo(.hdc, 20, 0, .ScaleWidth - 20, .ScaleHeight, 0, _ .ScaleHeight / 2, .ScaleWidth, .ScaleHeight / 2) End With End Sub Diese Seite wurde bereits 14.700 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. |