home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1999 September / pcp155a.iso / full / teechart / graph.exe / Form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  1999-06-28  |  1.9 KB  |  67 lines

  1. VERSION 5.00
  2. Object = "{008BBE7B-C096-11D0-B4E3-00A0C901D681}#1.0#0"; "TEECHART.OCX"
  3. Begin VB.Form Form1 
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   6930
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   5445
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   6930
  11.    ScaleWidth      =   5445
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin TeeChart.TChart TChart1 
  14.       Height          =   5655
  15.       Left            =   0
  16.       OleObjectBlob   =   "Form1.frx":0000
  17.       TabIndex        =   0
  18.       Top             =   120
  19.       Width           =   5415
  20.    End
  21.    Begin VB.CommandButton Command2 
  22.       Caption         =   "Editor"
  23.       Height          =   495
  24.       Left            =   1920
  25.       TabIndex        =   2
  26.       Top             =   6000
  27.       Width           =   1095
  28.    End
  29.    Begin VB.CommandButton Command1 
  30.       Caption         =   "Make Graph"
  31.       Height          =   495
  32.       Left            =   360
  33.       TabIndex        =   1
  34.       Top             =   6000
  35.       Width           =   1215
  36.    End
  37. Attribute VB_Name = "Form1"
  38. Attribute VB_GlobalNameSpace = False
  39. Attribute VB_Creatable = False
  40. Attribute VB_PredeclaredId = True
  41. Attribute VB_Exposed = False
  42. Option Explicit
  43. Private Sub Command1_Click()
  44. Dim x As Long, y As Long
  45. With TChart1
  46.     .RemoveAllSeries
  47.     .AddSeries scLine
  48.     .Aspect.View3D = False
  49.     With .Series(0)
  50.         For x = 1 To 15
  51.         y = x * x * x - 10 * x * x + 5 * x - 6
  52.         .AddXY x, y, "", vbRed
  53.         Next
  54.     End With
  55. End With
  56. TChart1.Axis.Left.Title.Caption = "y value"
  57. TChart1.Axis.Left.Title.Font.Size = 12
  58. TChart1.Axis.Bottom.Title.Caption = "x value"
  59. TChart1.Axis.Bottom.Title.Font.Size = 12
  60. TChart1.Legend.Visible = False
  61. TChart1.Header.Text.Add "Graph of y against x"
  62. TChart1.Series(0).asLine.LinePen.Width = 2
  63. End Sub
  64. Private Sub Command2_Click()
  65. TChart1.ShowEditor
  66. End Sub
  67.