home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2002 March
/
PCWMAR02.iso
/
software
/
turbocad
/
V4
/
tcw.z
/
hworld.bas
< prev
next >
Wrap
BASIC Source File
|
1997-09-29
|
816b
|
35 lines
'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