  Linien-Raster in ProgrammCode-Fenster einfügen	
  (Dem Programm sind eine PictureBox und zwei Command-Button zuzufügen)
  Ab dieser Zeile kopieren!


  'Verändern Sie Schritt auf 5 bzw. 2.5
  Const Schritt = 10
    
  Private Sub Command1_Click()
    If Command2.Caption = "Ende" Then
      Command2.ToolTipText = "Beendet das Programm"
      Command1.Enabled = False
    End If
    Picture1.Cls
    Command2.Enabled = True
    Command2.SetFocus
  End Sub
  
  Private Sub Command2_Click()
    If Command2.Caption = "Ende" Then End
    Command2.Caption = "True"
    Picture1.AutoRedraw = True
    Command1.SetFocus
    Command1.ToolTipText = "Löscht Picture1"
    If Command1.ToolTipText = "Löscht Picture1" Then
      Command2.Caption = "Ende"
      Command1.SetFocus
      Command2.Enabled = False
      Exit Sub
    End If
    Command2.Enabled = False
 End Sub

  Private Sub Form_Load()
    'Testen Sie das Programm, indem Sie die AutoRedraw-Zeilen
    'mit Rem (Hochkomma) herausnehmen
    Picture1.Scale (-55, 55)-(55, -55)
    Show
    Command1.Caption = "Cls"
    Command2.Caption = "AutoRedraw"
    Command1.SetFocus
    Command1.ToolTipText = "Versucht Picture1 zu löschen"
    Command2.ToolTipText = "Stellt AutoRedraw auf True"
    Command2.Enabled = False
    Picture1.AutoRedraw = True
    Picture1.Cls
    For x = -50 To 50 Step Schritt
      Picture1.Line (x, -50)-(x, 50), QBColor(8)
    Next
    For y = -50 To 50 Step Schritt
      Picture1.Line (-50, y)-(50, y), QBColor(8)
    Next
    Picture1.Line (0, 50)-(0, -50), QBColor(15)
    Picture1.Line (-50, 0)-(50, 0), QBColor(15)

    'Beschriftung x-Achse
    For x = -50 To 50 Step Schritt
      Picture1.CurrentX = x - 3: Picture1.CurrentY = -1
      Picture1.Print x
    Next
    'Beschriftung y-Achse
    For y = -50 To 50 Step Schritt
      Picture1.CurrentX = -7: Picture1.CurrentY = y + 2
      Picture1.Print y
    Next

    'Achsenbenennung
    Picture1.CurrentX = 52: Picture1.CurrentY = 4
    Picture1.ForeColor = QBColor(12)
    Picture1.Print "X"
    Picture1.CurrentX = 3: Picture1.CurrentY = 55
    Picture1.ForeColor = QBColor(9)
    Picture1.Print "Y"
    Picture1.AutoRedraw = False
  End Sub


Ende von Linien-Raster (Kopierende)



  Punkte-Raster in ProgrammCode-Fenster einfügen	
  (Dem Programm sind eine PictureBox und zwei Command-Button zuzufügen)
  Ab dieser Zeile kopieren!


  'Verändern Sie Schritt auf 5 bzw. 2.5
  Const Schritt = 10    
  
  Private Sub Command1_Click()
    If Command2.Caption = "Ende" Then
      Command2.ToolTipText = "Beendet das Programm"
      Command1.Enabled = False
    End If
    Picture1.Cls
    Command2.Enabled = True
    Command2.SetFocus
  End Sub
  
  Private Sub Command2_Click()
    If Command2.Caption = "Ende" Then End
    Command2.Caption = "True"
    Picture1.AutoRedraw = True
    Command1.SetFocus
    Command1.ToolTipText = "Löscht Picture1"
    If Command1.ToolTipText = "Löscht Picture1" Then
      Command2.Caption = "Ende"
      Command1.SetFocus
      Command2.Enabled = False
      Exit Sub
    End If
    Command2.Enabled = False
 End Sub

  Private Sub Form_Load()    
  'Testen Sie das Programm, indem Sie die AutoRedraw-Zeilen
  'mit Rem (Hochkomma) herausnehmen
    Picture1.Scale (-55, 55)-(55, -55)
    Show
    Command1.Caption = "Cls"  
    Command1.SetFocus   
    Command2.Caption = "AutoRedraw"
    Command1.ToolTipText = "Versucht Picture1 zu löschen"
    Command2.ToolTipText = "Stellt AutoRedraw auf True"
    Command2.Enabled = False
    Picture1.AutoRedraw = True 
    Picture1.Cls
    Picture1.Line (0, 50)-(0, -50), QBColor(15)
    Picture1.Line (-50, 0)-(50, 0), QBColor(15)
    For x = -50 To 50 Step Schritt
        For y = -50 To 50 Step Schritt
            Picture1.PSet (x, y), QBColor(0)
        Next
    Next

    'Beschriftung x-Achse
    For x = -50 To 50 Step Schritt
      Picture1.CurrentX = x - 3: Picture1.CurrentY = -1
      Picture1.Print x
    Next
    'Beschriftung y-Achse
    For y = -50 To 50 Step Schritt
      Picture1.CurrentX = -7: Picture1.CurrentY = y + 2
      Picture1.Print y
    Next

   'Achsenbenennung
    Picture1.CurrentX = 52: Picture1.CurrentY = 4
    Picture1.ForeColor = QBColor(12)
    Picture1.Print "X"
    Picture1.CurrentX = 3: Picture1.CurrentY = 55
    Picture1.ForeColor = QBColor(9)
    Picture1.Print "Y"
   
    Picture1.AutoRedraw = False 
  End Sub