home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 5 Developer's Kit / vb5 dev kit.iso / dev / ct_ocx / ct_text.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-01-01  |  10.5 KB  |  333 lines

  1. VERSION 4.00
  2. Begin VB.Form w_text_demo 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "ctText (Enhanced Text Label) Demo"
  5.    ClientHeight    =   5055
  6.    ClientLeft      =   1680
  7.    ClientTop       =   1785
  8.    ClientWidth     =   7650
  9.    Height          =   5460
  10.    Icon            =   "ct_text.frx":0000
  11.    Left            =   1620
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MDIChild        =   -1  'True
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   5055
  17.    ScaleWidth      =   7650
  18.    ShowInTaskbar   =   0   'False
  19.    Top             =   1440
  20.    Width           =   7770
  21.    Begin VB.CheckBox Check1 
  22.       Caption         =   "Three Dimensional Text"
  23.       ForeColor       =   &H00800000&
  24.       Height          =   255
  25.       Left            =   5340
  26.       TabIndex        =   16
  27.       Top             =   3900
  28.       Value           =   1  'Checked
  29.       Width           =   2175
  30.    End
  31.    Begin VB.ComboBox cmb_bord 
  32.       Height          =   315
  33.       Left            =   5340
  34.       Style           =   2  'Dropdown List
  35.       TabIndex        =   15
  36.       Top             =   3360
  37.       Width           =   2115
  38.    End
  39.    Begin VB.ComboBox cmb_pict 
  40.       Height          =   315
  41.       Left            =   5340
  42.       Style           =   2  'Dropdown List
  43.       TabIndex        =   14
  44.       Top             =   2580
  45.       Width           =   2115
  46.    End
  47.    Begin VB.ComboBox cmb_align 
  48.       Height          =   315
  49.       Left            =   5340
  50.       Style           =   2  'Dropdown List
  51.       TabIndex        =   13
  52.       Top             =   1800
  53.       Width           =   2115
  54.    End
  55.    Begin VB.ComboBox cmb_text 
  56.       Height          =   315
  57.       Left            =   5340
  58.       Style           =   2  'Dropdown List
  59.       TabIndex        =   12
  60.       Top             =   1080
  61.       Width           =   2115
  62.    End
  63.    Begin VB.CommandButton Command1 
  64.       Caption         =   "E&xit"
  65.       BeginProperty Font 
  66.          name            =   "MS Sans Serif"
  67.          charset         =   0
  68.          weight          =   700
  69.          size            =   8.25
  70.          underline       =   0   'False
  71.          italic          =   0   'False
  72.          strikethrough   =   0   'False
  73.       EndProperty
  74.       Height          =   375
  75.       Left            =   6480
  76.       TabIndex        =   11
  77.       Top             =   4500
  78.       Width           =   975
  79.    End
  80.    Begin VB.TextBox Text1 
  81.       Height          =   315
  82.       Left            =   1020
  83.       TabIndex        =   5
  84.       Text            =   "ctText Demonstration"
  85.       Top             =   4500
  86.       Width           =   2835
  87.    End
  88.    Begin VB.VScrollBar VScroll1 
  89.       Height          =   2475
  90.       Left            =   4755
  91.       Max             =   360
  92.       TabIndex        =   3
  93.       Top             =   1620
  94.       Width           =   255
  95.    End
  96.    Begin VB.Label Label7 
  97.       Caption         =   "Border Type"
  98.       BeginProperty Font 
  99.          name            =   "MS Sans Serif"
  100.          charset         =   0
  101.          weight          =   700
  102.          size            =   8.25
  103.          underline       =   0   'False
  104.          italic          =   0   'False
  105.          strikethrough   =   0   'False
  106.       EndProperty
  107.       ForeColor       =   &H00800000&
  108.       Height          =   255
  109.       Left            =   5340
  110.       TabIndex        =   10
  111.       Top             =   3060
  112.       Width           =   1935
  113.    End
  114.    Begin VB.Label Label6 
  115.       Caption         =   "Picture Position"
  116.       BeginProperty Font 
  117.          name            =   "MS Sans Serif"
  118.          charset         =   0
  119.          weight          =   700
  120.          size            =   8.25
  121.          underline       =   0   'False
  122.          italic          =   0   'False
  123.          strikethrough   =   0   'False
  124.       EndProperty
  125.       ForeColor       =   &H00800000&
  126.       Height          =   255
  127.       Left            =   5340
  128.       TabIndex        =   9
  129.       Top             =   2280
  130.       Width           =   1875
  131.    End
  132.    Begin VB.Label Label5 
  133.       Caption         =   "Alignment"
  134.       BeginProperty Font 
  135.          name            =   "MS Sans Serif"
  136.          charset         =   0
  137.          weight          =   700
  138.          size            =   8.25
  139.          underline       =   0   'False
  140.          italic          =   0   'False
  141.          strikethrough   =   0   'False
  142.       EndProperty
  143.       ForeColor       =   &H00800000&
  144.       Height          =   255
  145.       Left            =   5340
  146.       TabIndex        =   8
  147.       Top             =   1500
  148.       Width           =   1575
  149.    End
  150.    Begin VB.Label Label4 
  151.       Caption         =   "Text Position"
  152.       BeginProperty Font 
  153.          name            =   "MS Sans Serif"
  154.          charset         =   0
  155.          weight          =   700
  156.          size            =   8.25
  157.          underline       =   0   'False
  158.          italic          =   0   'False
  159.          strikethrough   =   0   'False
  160.       EndProperty
  161.       ForeColor       =   &H00800000&
  162.       Height          =   255
  163.       Left            =   5340
  164.       TabIndex        =   7
  165.       Top             =   780
  166.       Width           =   1335
  167.    End
  168.    Begin VB.Label Label3 
  169.       Alignment       =   2  'Center
  170.       Caption         =   "Move scroll bar to rotate text"
  171.       ForeColor       =   &H00800000&
  172.       Height          =   435
  173.       Left            =   4260
  174.       TabIndex        =   6
  175.       Top             =   4260
  176.       Width           =   1155
  177.    End
  178.    Begin VB.Label Label2 
  179.       Caption         =   "Text :"
  180.       BeginProperty Font 
  181.          name            =   "MS Sans Serif"
  182.          charset         =   0
  183.          weight          =   700
  184.          size            =   8.25
  185.          underline       =   0   'False
  186.          italic          =   0   'False
  187.          strikethrough   =   0   'False
  188.       EndProperty
  189.       Height          =   255
  190.       Left            =   420
  191.       TabIndex        =   4
  192.       Top             =   4500
  193.       Width           =   615
  194.    End
  195.    Begin TextLib.ctText ct_Text 
  196.       Height          =   2475
  197.       Left            =   360
  198.       TabIndex        =   2
  199.       Top             =   1620
  200.       Width           =   4395
  201.       _version        =   65536
  202.       _extentx        =   7752
  203.       _extenty        =   4366
  204.       _stockprops     =   70
  205.       caption         =   "ctText Demonstration"
  206.       BeginProperty font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  207.          name            =   "Arial"
  208.          charset         =   0
  209.          weight          =   700
  210.          size            =   14.25
  211.          underline       =   0   'False
  212.          italic          =   0   'False
  213.          strikethrough   =   0   'False
  214.       EndProperty
  215.       forecolor       =   16711680
  216.       bordertype      =   3
  217.       picposition     =   10
  218.       alignment       =   2
  219.       threedtext      =   -1  'True
  220.       picture         =   "ct_text.frx":030A
  221.    End
  222.    Begin TextLib.ctText ctText1 
  223.       Height          =   615
  224.       Left            =   360
  225.       TabIndex        =   1
  226.       Top             =   780
  227.       Width           =   4635
  228.       _version        =   65536
  229.       _extentx        =   8176
  230.       _extenty        =   1085
  231.       _stockprops     =   70
  232.       caption         =   "ctText OCX Control"
  233.       BeginProperty font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  234.          name            =   "Times New Roman"
  235.          charset         =   0
  236.          weight          =   700
  237.          size            =   20.25
  238.          underline       =   0   'False
  239.          italic          =   0   'False
  240.          strikethrough   =   0   'False
  241.       EndProperty
  242.       forecolor       =   8388608
  243.       bordertype      =   4
  244.       alignment       =   2
  245.       threedtext      =   -1  'True
  246.       picture         =   "ct_text.frx":1274
  247.    End
  248.    Begin VB.Label Label1 
  249.       Alignment       =   2  'Center
  250.       Caption         =   $"ct_text.frx":1290
  251.       BeginProperty Font 
  252.          name            =   "MS Sans Serif"
  253.          charset         =   0
  254.          weight          =   700
  255.          size            =   8.25
  256.          underline       =   0   'False
  257.          italic          =   0   'False
  258.          strikethrough   =   0   'False
  259.       EndProperty
  260.       ForeColor       =   &H00800000&
  261.       Height          =   555
  262.       Left            =   120
  263.       TabIndex        =   0
  264.       Top             =   180
  265.       Width           =   7395
  266.    End
  267. Attribute VB_Name = "w_text_demo"
  268. Attribute VB_Creatable = False
  269. Attribute VB_Exposed = False
  270. Private Sub Check1_Click()
  271.     If Check1.Value = 0 Then
  272.        ct_text.ThreeDText = False
  273.     Else
  274.        ct_text.ThreeDText = True
  275.     End If
  276. End Sub
  277. Private Sub cmb_align_Click()
  278.    ct_text.Alignment = cmb_align.ListIndex
  279. End Sub
  280. Private Sub cmb_bord_Click()
  281.    ct_text.BorderType = cmb_bord.ListIndex
  282. End Sub
  283. Private Sub cmb_pict_Click()
  284.    ct_text.PicPosition = cmb_pict.ListIndex
  285. End Sub
  286. Private Sub cmb_text_Click()
  287.    ct_text.TextPosition = cmb_text.ListIndex
  288. End Sub
  289. Private Sub Command1_Click()
  290.    Unload w_text_demo
  291. End Sub
  292. Private Sub Form_Load()
  293.    ' Center the window on the screen
  294.    Move (Screen.Width - Width) / 2, (Screen.Height - Height) * 0.25
  295.    cmb_text.AddItem "0 - Top"
  296.    cmb_text.AddItem "1 - Bottom"
  297.    cmb_text.AddItem "2 - Centered"
  298.    cmb_text.ListIndex = 2
  299.    cmb_align.AddItem "0 - Left Justified"
  300.    cmb_align.AddItem "1 - Right Justified"
  301.    cmb_align.AddItem "2 - Centered"
  302.    cmb_align.ListIndex = 2
  303.    cmb_pict.AddItem "0 - Center"
  304.    cmb_pict.AddItem "1 - Top Left"
  305.    cmb_pict.AddItem "2 - Top Center"
  306.    cmb_pict.AddItem "3 - Top Right"
  307.    cmb_pict.AddItem "4 - Middle Left"
  308.    cmb_pict.AddItem "5 - Middle Right"
  309.    cmb_pict.AddItem "6 - Bottom Left"
  310.    cmb_pict.AddItem "7 - Bottom Center"
  311.    cmb_pict.AddItem "8 - Bottom Right"
  312.    cmb_pict.AddItem "9 - Stretch to Fit"
  313.    cmb_pict.AddItem "10 - Tile"
  314.    cmb_pict.AddItem "11 - Hide"
  315.    cmb_pict.ListIndex = 10
  316.    cmb_bord.AddItem "0 - Regular"
  317.    cmb_bord.AddItem "1 - None"
  318.    cmb_bord.AddItem "2 - Raised"
  319.    cmb_bord.AddItem "3 - Lowered"
  320.    cmb_bord.AddItem "4 - Drop Shadow"
  321.    cmb_bord.AddItem "5 - Inset"
  322.    cmb_bord.ListIndex = 3
  323. End Sub
  324. Private Sub Text1_Change()
  325.    ct_text.Caption = Text1.Text
  326. End Sub
  327. Private Sub VScroll1_Change()
  328.    ct_text.TextAngle = VScroll1.Value
  329. End Sub
  330. Private Sub VScroll1_Scroll()
  331.    ct_text.TextAngle = VScroll1.Value
  332. End Sub
  333.