home *** CD-ROM | disk | FTP | other *** search
- 'Hello World in TurboCAD
- Sub Main()
- Dim hDrawing As Long
- Dim hGraphic As Long
- Dim Result As Long
- Dim e As String
- Dim measure As double
- Dim es1 As Long
- Dim es As double
-
- measure = Abs(TCWViewExtentsGetY2() - TCWViewExtentsGetY1())/8.5
- es1=50*measure
- es=es1/100
-
- 'Must have a drawing active
- hDrawing = TCWDrawingActive()
- If (hDrawing = 0) Then
- TCWLastErrorGet(e)
- MsgBox e
- Stop
- End If
-
- 'Create a graphic that has the text "hello world"
- 'TCWText takes 6 parameters: X, Y, Z, string, font size, and
- 'angle to print text
- hGraphic = TCWText(2#*measure, 2#*measure, 0#, "Hello World!",es, 0#)
- 'hGraphic should how have a handle to our text graphic
- If (hGraphic = 0) Then
- TCWLastErrorGet(e)
- MsgBox e
- Stop
- End If
- End Sub
-
-