home *** CD-ROM | disk | FTP | other *** search
/ An Introduction to Progr…l Basic 6.0 (4th Edition) / An Introduction to Programming using Visual Basic 6.0.iso / PROGRAMS / CH10 / 10-4-3.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-11-02  |  1.6 KB  |  52 lines

  1. VERSION 5.00
  2. Begin VB.Form frm10_4_3 
  3.    Caption         =   "10.4 Example 3"
  4.    ClientHeight    =   2640
  5.    ClientLeft      =   1155
  6.    ClientTop       =   1470
  7.    ClientWidth     =   2520
  8.    BeginProperty Font 
  9.       Name            =   "MS Sans Serif"
  10.       Size            =   8.25
  11.       Charset         =   0
  12.       Weight          =   700
  13.       Underline       =   0   'False
  14.       Italic          =   0   'False
  15.       Strikethrough   =   0   'False
  16.    EndProperty
  17.    LinkTopic       =   "Form1"
  18.    PaletteMode     =   1  'UseZOrder
  19.    ScaleHeight     =   2640
  20.    ScaleWidth      =   2520
  21.    Begin VB.PictureBox picOutput 
  22.       Height          =   1815
  23.       Left            =   120
  24.       ScaleHeight     =   1755
  25.       ScaleWidth      =   2235
  26.       TabIndex        =   1
  27.       Top             =   720
  28.       Width           =   2295
  29.    End
  30.    Begin VB.CommandButton cmdDraw 
  31.       Caption         =   "Draw Semicircle"
  32.       Height          =   495
  33.       Left            =   480
  34.       TabIndex        =   0
  35.       Top             =   120
  36.       Width           =   1575
  37.    End
  38. Attribute VB_Name = "frm10_4_3"
  39. Attribute VB_GlobalNameSpace = False
  40. Attribute VB_Creatable = False
  41. Attribute VB_PredeclaredId = True
  42. Attribute VB_Exposed = False
  43. Private Sub cmdDraw_Click()
  44.   Dim c As Single
  45.   'Draw bottom half of circle filled with vertical lines
  46.   c = 2 * 3.14159
  47.   picOutput.Cls
  48.   picOutput.Scale (-3, 3)-(3, -3)    'Specify coordinate system
  49.   picOutput.FillStyle = 3            'Vertical lines
  50.   picOutput.Circle (0, 0), 2, , -0.5 * c, -1 * c
  51. End Sub
  52.