home *** CD-ROM | disk | FTP | other *** search
/ Using Visual Basic 5 (Platinum Edition) / vb5.iso / ACTIVEX / VIS3SPAC / DATA.9 / examples / vb / 06_03Complex3DText / 06_03Complex3DText.frm (.txt) next >
Encoding:
Visual Basic Form  |  1996-10-13  |  3.2 KB  |  86 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "06_03Complex3DText"
  4.    ClientHeight    =   4890
  5.    ClientLeft      =   915
  6.    ClientTop       =   1230
  7.    ClientWidth     =   5730
  8.    Height          =   5265
  9.    Left            =   855
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4890
  12.    ScaleWidth      =   5730
  13.    Top             =   915
  14.    Width           =   5850
  15.    Begin TgsVisual3SpaceLibCtl.V3Space V3Space1 
  16.       Height          =   4932
  17.       Left            =   0
  18.       TabIndex        =   0
  19.       Top             =   0
  20.       Width           =   5772
  21.       _Version        =   131072
  22.       _ExtentX        =   10181
  23.       _ExtentY        =   8700
  24.       _StockProps     =   0
  25.       decorationOn    =   0   'False
  26.    End
  27. Attribute VB_Name = "Form1"
  28. Attribute VB_Creatable = False
  29. Attribute VB_Exposed = False
  30. Private Sub Form_Initialize()
  31.     Dim root As SoGroup
  32.     Set root = New SoGroup
  33.     'Let's make the front of the text white,
  34.     'and the sides and back shiny yellow
  35.     Dim myMaterial As SoMaterial
  36.     Set myMaterial = New SoMaterial
  37.     Call myMaterial.diffuseColor.set1RGBValue(0, 1, 1, 1)
  38.     Call myMaterial.diffuseColor.set1RGBValue(1, 1, 1, 0)
  39.     Call myMaterial.diffuseColor.set1RGBValue(2, 1, 1, 0)
  40.     'specular
  41.     Call myMaterial.specularColor.setValue(1, 1, 1)
  42.     Call myMaterial.shininess.setValue(0.1)
  43.     Call root.addChild(myMaterial)
  44.     'Choose a font likely to exist.
  45.     Dim myFont As SoFont
  46.     Set myFont = New SoFont
  47.     Call myFont.Name.setValue("Times New Roman;Regular")
  48.     Call root.addChild(myFont)
  49.     'Specify a beveled cross-section for the text
  50.     Dim myProfileCoords As SoProfileCoordinate2
  51.     Set myProfileCoords = New SoProfileCoordinate2
  52.     Call myProfileCoords.Point.set1Value(0#, 0#, 0#)
  53.     Call myProfileCoords.Point.set1Value(1, 0.25, 0.25)
  54.     Call myProfileCoords.Point.set1Value(2, 1.25, 0.25)
  55.     Call myProfileCoords.Point.set1Value(3, 1.5, 0#)
  56.     Call root.addChild(myProfileCoords)
  57.     Dim myLinearProfile As SoLinearProfile
  58.     Set myLinearProfile = New SoLinearProfile
  59.     Call myLinearProfile.Index.set1Value(0, 0)
  60.     Call myLinearProfile.Index.set1Value(1, 1)
  61.     Call myLinearProfile.Index.set1Value(2, 2)
  62.     Call myLinearProfile.Index.set1Value(3, 3)
  63.     Call root.addChild(myLinearProfile)
  64.     'Set the material binding to PER_PART
  65.     Dim myMaterialBinding As SoMaterialBinding
  66.     Set myMaterialBinding = New SoMaterialBinding
  67.     Call myMaterialBinding.Value.setValue(3) 'SoMaterialBinding::PER_PART)
  68.     Call root.addChild(myMaterialBinding)
  69.     'Add the text
  70.     Dim myText3 As SoText3
  71.     Set myText3 = New SoText3
  72.     Call myText3.Str.setValue("Beveled Text")
  73.     Call myText3.justification.setValue(&H2&) 'SoText3::CENTER)
  74.     Call myText3.parts.setValue(&H7&) 'SoText3::ALL);
  75.     Call root.addChild(myText3)
  76.     Call V3Space1.setSceneRoot(root)
  77.     Call V3Space1.viewAll
  78.     Set root = Nothing
  79.     Set myMaterial = Nothing
  80.     Set myFont = Nothing
  81.     Set myProfileCoords = Nothing
  82.     Set myLinearProfile = Nothing
  83.     Set myMaterialBinding = Nothing
  84.     Set myText3 = Nothing
  85. End Sub
  86.