Dim Shared Xpix, Ypix, Xuk, Yuk, Xok, Yok Sub Axes (Lx, Ly) Bild.Line (Fpx(Xuk), Fpy(Ly))-(Fpx(Xok), Fpy(Ly)) 'Achsen zeichnen Bild.Line (Fpx(Lx), Fpy(Yuk))-(Fpx(Lx), Fpy(Yok)) End Sub Sub Axes0 (Lx, Ly) Bild.Line (Fpx(Lx), Fpy(Ly))-(Fpx(Xok), Fpy(Ly)) 'Achsen zeichnen Bild.Line (Fpx(Lx), Fpy(Ly))-(Fpx(Lx), Fpy(Yok)) End Sub Sub bClipBoard_Click () Clipboard.Clear Clipboard.SetData Bild.Image End Sub Function Density (H, N) Dmax = 240 Density = Dmax - H / N * Dmax End Function Sub DrawIt_Click () On Error GoTo Ende Dim Hh As Long Dim Mmt As moment Monat = "JanFebMärAprMaiJunJulAugSepOktNovDez" Bild.Cls Bild.ScaleMode = 6' in Millimeter Bild.FontName = "Arial" Bild.FontSize = tFontSize.Text UsrScale -36, 360, -10, 100 Axes0 0, 0 classfile = Trim(Classes.Text) Momentfile = Trim(Moments.Text) Open classfile For Binary As #1 Open Momentfile For Binary As #2 dX = Fpx(1) - Fpx(0) dY = Fpy(1) - Fpy(0) For x = 1 To 360 DoEvents K = 0 For y = 1 To 100 j = y i = x - 1 ij = 4 * (i + j * 360) + 1 Get #1, ij, Hh If Hh > 0 Then c = Density(Hh, 1000) If c < 0 Then c = 0 Bild.Line (Fpx(x), Fpy(y))-Step(dX, -dY), RGB(c, c, c), BF End If Next y Next x MyMove 0, 0 For i = 1 To 360 Get #2, 24 * (i - 1) + 1, Mmt K = Mmt.Xmin Plot i, K Next i MyMove 0, 0 For i = 1 To 360 Get #2, 24 * (i - 1) + 1, Mmt K = Mmt.Xmax Plot i, K Next i 'Koordinatensystem einzeichnen Axes0 0, 0 For i = 30 To 360 Step 30 MyMove i, 0 hmove 0, 2 Plot i, 0 m = i / 30 - 1 Lab = Mid(Monat, 3 * m + 1, 3) MyMove i - 15, 0 hmove -Bild.TextWidth(Lab) / 2, -.2 * Bild.TextHeight(Lab) Bild.Print Lab Next i For i = 0 To 80 Step 20 MyMove 0, i hmove 2, 0 Plot 0, i Lab = Trim(Str(i)) MyMove 0, i hmove -Bild.TextWidth(Lab) - 2, .5 * Bild.TextHeight(Lab) Bild.Print Lab Next i Ende: Close #1 Close #2 End Sub Function Fpx (x) Fpx = (x - Xuk) / (Xok - Xuk) * Xpix End Function Function Fpy (y) Fpy = Ypix - (y - Yuk) / (Yok - Yuk) * Ypix End Function Sub Frame () Bild.Line (0, 0)-(Xpix - 1, Ypix - 1), 15, B End Sub Sub hmove (x, y) Bild.CurrentX = Bild.CurrentX + x Bild.CurrentY = Bild.CurrentY - y End Sub Sub MyMove (x, y) XX = Fpx(x) yy = Fpy(y) Bild.CurrentX = XX Bild.CurrentY = yy End Sub Sub Palette_Click () Dim s As Integer Bild.Cls Bild.FontName = "Arial" Bild.FontSize = tFontSize.Text Bild.Scale (0, 0)-(600, 300) s = 10 w = 2 Abst = 0 For i = 0 To 1000 Step 100 Lab = Trim(Str(i)) x = i / w + 50 y = 75 Bild.CurrentX = x - Bild.TextWidth(Lab) / 2 Bild.CurrentY = 75 Bild.Print Lab Bild.Line (x, 100)-Step(0, -5) Next i For i = 0 To 1000 - s Step s c = Density(i, 1000) c = RGB(c, c, c) Bild.Line (i / w + 50, 100)-((i + s - Abst) / w + 50, 200), c, BF Next i End Sub Sub Plot (x, y) XX = Fpx(x) yy = Fpy(y) Bild.Line -(XX, yy) End Sub Sub UsrScale (ux, ox, uy, oy) Xpix = Bild.ScaleWidth Ypix = Bild.ScaleHeight Xuk = ux Xok = ox Yuk = uy Yok = oy 'Koordinatengrenzen in SHARED-Variablen ablegen End Sub