home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / truegrid / disk1 / vsdemo / vsdemo.$ / SPLITTER.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-12-30  |  11.6 KB  |  294 lines

  1. VERSION 2.00
  2. Begin Form Splitter 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Resize controls using the colored splitter bars"
  5.    ClientHeight    =   3720
  6.    ClientLeft      =   570
  7.    ClientTop       =   1635
  8.    ClientWidth     =   8415
  9.    Height          =   4185
  10.    Left            =   480
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   3720
  13.    ScaleWidth      =   8415
  14.    Top             =   1260
  15.    Width           =   8595
  16.    Begin VideoSoftElastic mainElastic 
  17.       Align           =   5  'Fill Container
  18.       AutoSizeChildren=   2  'Uneven Horizontal
  19.       BackColor       =   &H0080FFFF&
  20.       BorderWidth     =   0
  21.       ConvInfo        =   SPLITTER.FRX:0000
  22.       Height          =   3720
  23.       IntBkg          =   &H0080FFFF&
  24.       Left            =   0
  25.       Splitter        =   1  'Yes (with uneven AutoSize)
  26.       TabIndex        =   0
  27.       Top             =   0
  28.       Width           =   8415
  29.       Begin VideoSoftElastic MiddleElastic 
  30.          AutoSizeChildren=   1  'Even Horizontal
  31.          BevelInner      =   9  'Inset New Look
  32.          BevelOuter      =   1  'Raised
  33.          BevelOuterWidth =   1
  34.          BorderWidth     =   12
  35.          ConvInfo        =   SPLITTER.FRX:000B
  36.          Height          =   3720
  37.          IntBkg          =   &H00C0C0C0&
  38.          Left            =   2475
  39.          TabIndex        =   5
  40.          Top             =   0
  41.          Width           =   2835
  42.          Begin TextBox Text2 
  43.             BorderStyle     =   0  'None
  44.             FontBold        =   0   'False
  45.             FontItalic      =   0   'False
  46.             FontName        =   "MS Sans Serif"
  47.             FontSize        =   8.25
  48.             FontStrikethru  =   0   'False
  49.             FontUnderline   =   0   'False
  50.             Height          =   3360
  51.             Left            =   180
  52.             TabIndex        =   7
  53.             Text            =   "Text2"
  54.             Top             =   180
  55.             Width           =   2475
  56.          End
  57.       End
  58.       Begin VideoSoftElastic LeftElastic 
  59.          AutoSizeChildren=   1  'Even Horizontal
  60.          BevelInner      =   9  'Inset New Look
  61.          BevelOuter      =   1  'Raised
  62.          BevelOuterWidth =   1
  63.          BorderWidth     =   12
  64.          ConvInfo        =   SPLITTER.FRX:0016
  65.          Height          =   3720
  66.          IntBkg          =   &H00C0C0C0&
  67.          Left            =   0
  68.          TabIndex        =   4
  69.          Top             =   0
  70.          Width           =   2385
  71.          Begin TextBox Text1 
  72.             BorderStyle     =   0  'None
  73.             FontBold        =   0   'False
  74.             FontItalic      =   0   'False
  75.             FontName        =   "MS Sans Serif"
  76.             FontSize        =   8.25
  77.             FontStrikethru  =   0   'False
  78.             FontUnderline   =   0   'False
  79.             Height          =   3360
  80.             Left            =   180
  81.             TabIndex        =   6
  82.             Text            =   "Text1"
  83.             Top             =   180
  84.             Width           =   2025
  85.          End
  86.       End
  87.       Begin VideoSoftElastic RightElastic 
  88.          AutoSizeChildren=   4  'Uneven Vertical
  89.          BackColor       =   &H0080FFFF&
  90.          BorderWidth     =   0
  91.          ConvInfo        =   SPLITTER.FRX:0021
  92.          Height          =   3720
  93.          IntBkg          =   &H0080FFFF&
  94.          Left            =   5400
  95.          Splitter        =   1  'Yes (with uneven AutoSize)
  96.          TabIndex        =   1
  97.          Top             =   0
  98.          Width           =   3015
  99.          Begin VideoSoftElastic ElasticTop 
  100.             AutoSizeChildren=   3  'Even Vertical
  101.             BevelInner      =   0  'None
  102.             BevelInnerWidth =   3
  103.             BevelOuter      =   1  'Raised
  104.             BevelOuterWidth =   1
  105.             BorderWidth     =   12
  106.             ChildSpacing    =   10
  107.             ConvInfo        =   SPLITTER.FRX:002C
  108.             Height          =   2985
  109.             IntBkg          =   &H00C0C0C0&
  110.             Left            =   0
  111.             TabIndex        =   3
  112.             Top             =   0
  113.             Width           =   3015
  114.             Begin VideoSoftElastic Command1 
  115.                BevelInner      =   0  'None
  116.                BevelOuter      =   8  'Raised New Look
  117.                CaptionPos      =   4  'Center Center
  118.                ConvInfo        =   SPLITTER.FRX:0037
  119.                FontBold        =   0   'False
  120.                FontItalic      =   0   'False
  121.                FontName        =   "MS Sans Serif"
  122.                FontSize        =   8.25
  123.                FontStrikethru  =   0   'False
  124.                FontUnderline   =   0   'False
  125.                Height          =   540
  126.                Index           =   3
  127.                IntBkg          =   &H00C0C0C0&
  128.                Left            =   180
  129.                Style           =   3  'Command Button
  130.                TabIndex        =   11
  131.                Top             =   2265
  132.                Width           =   2655
  133.             End
  134.             Begin VideoSoftElastic Command1 
  135.                BevelInner      =   0  'None
  136.                BevelOuter      =   8  'Raised New Look
  137.                CaptionPos      =   4  'Center Center
  138.                ConvInfo        =   SPLITTER.FRX:0042
  139.                FontBold        =   0   'False
  140.                FontItalic      =   0   'False
  141.                FontName        =   "MS Sans Serif"
  142.                FontSize        =   8.25
  143.                FontStrikethru  =   0   'False
  144.                FontUnderline   =   0   'False
  145.                Height          =   540
  146.                Index           =   2
  147.                IntBkg          =   &H00C0C0C0&
  148.                Left            =   180
  149.                Style           =   3  'Command Button
  150.                TabIndex        =   10
  151.                Top             =   1575
  152.                Width           =   2655
  153.             End
  154.             Begin VideoSoftElastic Command1 
  155.                AccessKey       =   -1  'True
  156.                BevelInner      =   0  'None
  157.                BevelOuter      =   8  'Raised New Look
  158.                Caption         =   "&Fonts"
  159.                CaptionPos      =   4  'Center Center
  160.                ConvInfo        =   SPLITTER.FRX:004D
  161.                FontBold        =   0   'False
  162.                FontItalic      =   0   'False
  163.                FontName        =   "MS Sans Serif"
  164.                FontSize        =   8.25
  165.                FontStrikethru  =   0   'False
  166.                FontUnderline   =   0   'False
  167.                Height          =   540
  168.                Index           =   1
  169.                IntBkg          =   &H00C0C0C0&
  170.                Left            =   180
  171.                Style           =   3  'Command Button
  172.                TabIndex        =   9
  173.                Top             =   885
  174.                Width           =   2655
  175.             End
  176.             Begin VideoSoftElastic Command1 
  177.                AccessKey       =   -1  'True
  178.                BevelInner      =   0  'None
  179.                BevelOuter      =   8  'Raised New Look
  180.                Caption         =   "&Colors"
  181.                CaptionPos      =   4  'Center Center
  182.                ConvInfo        =   SPLITTER.FRX:0058
  183.                FontBold        =   0   'False
  184.                FontItalic      =   0   'False
  185.                FontName        =   "MS Sans Serif"
  186.                FontSize        =   8.25
  187.                FontStrikethru  =   0   'False
  188.                FontUnderline   =   0   'False
  189.                Height          =   555
  190.                Index           =   0
  191.                IntBkg          =   &H00C0C0C0&
  192.                Left            =   180
  193.                Style           =   3  'Command Button
  194.                TabIndex        =   8
  195.                Top             =   180
  196.                Width           =   2655
  197.             End
  198.          End
  199.          Begin VideoSoftElastic ElasticBottom 
  200.             AutoSizeChildren=   1  'Even Horizontal
  201.             BevelInner      =   0  'None
  202.             BevelInnerWidth =   4
  203.             BevelOuter      =   1  'Raised
  204.             BevelOuterWidth =   1
  205.             BorderWidth     =   10
  206.             ChildSpacing    =   12
  207.             ConvInfo        =   SPLITTER.FRX:0063
  208.             Height          =   645
  209.             IntBkg          =   &H00C0C0C0&
  210.             Left            =   0
  211.             TabIndex        =   2
  212.             Top             =   3075
  213.             Width           =   3015
  214.             Begin VideoSoftElastic Command1 
  215.                BevelInner      =   0  'None
  216.                BevelOuter      =   8  'Raised New Look
  217.                Caption         =   "C"
  218.                CaptionPos      =   4  'Center Center
  219.                ConvInfo        =   SPLITTER.FRX:006E
  220.                FontBold        =   0   'False
  221.                FontItalic      =   0   'False
  222.                FontName        =   "MS Sans Serif"
  223.                FontSize        =   8.25
  224.                FontStrikethru  =   0   'False
  225.                FontUnderline   =   0   'False
  226.                Height          =   345
  227.                Index           =   6
  228.                IntBkg          =   &H00C0C0C0&
  229.                Left            =   2085
  230.                Style           =   3  'Command Button
  231.                TabIndex        =   14
  232.                Top             =   150
  233.                Width           =   780
  234.             End
  235.             Begin VideoSoftElastic Command1 
  236.                BevelInner      =   0  'None
  237.                BevelOuter      =   8  'Raised New Look
  238.                Caption         =   "B"
  239.                CaptionPos      =   4  'Center Center
  240.                ConvInfo        =   SPLITTER.FRX:0079
  241.                FontBold        =   0   'False
  242.                FontItalic      =   0   'False
  243.                FontName        =   "MS Sans Serif"
  244.                FontSize        =   8.25
  245.                FontStrikethru  =   0   'False
  246.                FontUnderline   =   0   'False
  247.                Height          =   345
  248.                Index           =   5
  249.                IntBkg          =   &H00C0C0C0&
  250.                Left            =   1125
  251.                Style           =   3  'Command Button
  252.                TabIndex        =   13
  253.                Top             =   150
  254.                Width           =   780
  255.             End
  256.             Begin VideoSoftElastic Command1 
  257.                BevelInner      =   0  'None
  258.                BevelOuter      =   8  'Raised New Look
  259.                Caption         =   "A"
  260.                CaptionPos      =   4  'Center Center
  261.                ConvInfo        =   SPLITTER.FRX:0084
  262.                FontBold        =   0   'False
  263.                FontItalic      =   0   'False
  264.                FontName        =   "MS Sans Serif"
  265.                FontSize        =   8.25
  266.                FontStrikethru  =   0   'False
  267.                FontUnderline   =   0   'False
  268.                Height          =   345
  269.                Index           =   4
  270.                IntBkg          =   &H00C0C0C0&
  271.                Left            =   150
  272.                Style           =   3  'Command Button
  273.                TabIndex        =   12
  274.                Top             =   150
  275.                Width           =   795
  276.             End
  277.          End
  278.       End
  279.    End
  280. Option Explicit
  281. Sub Command1_Click (Index As Integer)
  282.   Dim newcolor&
  283.   Select Case Index
  284.     Case 0  'Change to random colors
  285.       newcolor = QBColor(Rnd * 15)
  286.       MainElastic.BackColor = newcolor
  287.       RightElastic.BackColor = newcolor
  288.     Case 1   'Fonts
  289.       Text1.FontSize = (Text1.FontSize + 2) Mod 13
  290.       Text2.FontSize = (Text2.FontSize + 2) Mod 13
  291.       
  292.   End Select
  293. End Sub
  294.