·  Start ·  Programme ·  Codes ·  Tipps ·  ActiveX ·  Tutorials · 



Für dieses Beispiel brauchen Sie eine Form, eine Picturebox und einen Commandbutton.

Option Explicit 
 
Const PI As Double = 3.14159265359
Const CircleEnd As Double = -2 * PI


Private Sub DrawPiePiece(lColor As Long, fStart As Double, fEnd As Double)
 
    Dim dStart As Double 
    Dim dEnd As Double 
    Picture1.FillColor = lColor
    Picture1.FillStyle = 0
    dStart = fStart * (CircleEnd / 100)
    dEnd = fEnd * (CircleEnd / 100)
    Picture1.Circle (100, 100), 60, , dStart, dEnd
 
End Sub 
 
Private Sub Command1_Click()
 
    Picture1.ScaleMode = vbPixels
        Call DrawPiePiece(QBColor(1), 0.001, 36)
        Call DrawPiePiece(QBColor(2), 36, 55)
        Call DrawPiePiece(QBColor(3), 55, 75)
        Call DrawPiePiece(QBColor(4), 75, 99.999)
 
End Sub Private Sub Form_Load()
 
    ' Nur Initialisierungen... 
    Me.Height = 4000
    Me.Width = 3200
 
    Picture1.Move 120, 120, 2700, 2700
    Picture1.AutoRedraw = True 
 
    Command1.Move 120, 2900
    Command1.Caption = "&Zeichne..."
End Sub 
Aktualisiert: 12.02.2008, 14:11 Uhr Copyright © 2001 - 2010 by ST-software Navigation zurück  |  Navigation vorwärts  |  Zum Seitenanfang     
Ihre IP: 38.107.191.81 ·  Seite erstellt in: 0.178 Sekunden ·  Dateigröße:  2927 Bytes