home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / ch_code / ch09 / fstring / fstring.frm (.txt) next >
Encoding:
Visual Basic Form  |  1998-04-22  |  3.8 KB  |  116 lines

  1. VERSION 5.00
  2. Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
  3. Begin VB.Form FStringForm 
  4.    Caption         =   "FormatString Demo"
  5.    ClientHeight    =   3735
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   5370
  9.    BeginProperty Font 
  10.       Name            =   "Verdana"
  11.       Size            =   9.75
  12.       Charset         =   0
  13.       Weight          =   400
  14.       Underline       =   0   'False
  15.       Italic          =   0   'False
  16.       Strikethrough   =   0   'False
  17.    EndProperty
  18.    LinkTopic       =   "Form1"
  19.    ScaleHeight     =   3735
  20.    ScaleWidth      =   5370
  21.    StartUpPosition =   3  'Windows Default
  22.    Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
  23.       Height          =   2805
  24.       Left            =   90
  25.       TabIndex        =   3
  26.       Top             =   135
  27.       Width           =   5145
  28.       _ExtentX        =   9075
  29.       _ExtentY        =   4948
  30.       _Version        =   393216
  31.       Rows            =   20
  32.       Cols            =   5
  33.    End
  34.    Begin VB.CommandButton Command3 
  35.       Caption         =   "Both"
  36.       BeginProperty Font 
  37.          Name            =   "Verdana"
  38.          Size            =   9
  39.          Charset         =   0
  40.          Weight          =   400
  41.          Underline       =   0   'False
  42.          Italic          =   0   'False
  43.          Strikethrough   =   0   'False
  44.       EndProperty
  45.       Height          =   465
  46.       Left            =   3750
  47.       TabIndex        =   2
  48.       Top             =   3135
  49.       Width           =   1455
  50.    End
  51.    Begin VB.CommandButton Command2 
  52.       Caption         =   "Fixed Column"
  53.       BeginProperty Font 
  54.          Name            =   "Verdana"
  55.          Size            =   9
  56.          Charset         =   0
  57.          Weight          =   400
  58.          Underline       =   0   'False
  59.          Italic          =   0   'False
  60.          Strikethrough   =   0   'False
  61.       EndProperty
  62.       Height          =   465
  63.       Left            =   1920
  64.       TabIndex        =   1
  65.       Top             =   3150
  66.       Width           =   1455
  67.    End
  68.    Begin VB.CommandButton Command1 
  69.       Caption         =   "Fixed Row"
  70.       BeginProperty Font 
  71.          Name            =   "Verdana"
  72.          Size            =   9
  73.          Charset         =   0
  74.          Weight          =   400
  75.          Underline       =   0   'False
  76.          Italic          =   0   'False
  77.          Strikethrough   =   0   'False
  78.       EndProperty
  79.       Height          =   465
  80.       Left            =   105
  81.       TabIndex        =   0
  82.       Top             =   3150
  83.       Width           =   1455
  84.    End
  85. Attribute VB_Name = "FStringForm"
  86. Attribute VB_GlobalNameSpace = False
  87. Attribute VB_Creatable = False
  88. Attribute VB_PredeclaredId = True
  89. Attribute VB_Exposed = False
  90. '  ******************************
  91. '  ******************************
  92. '  ** MASTERING VB6            **
  93. '  ** by Evangelos Petroutos   **
  94. '  ** SYBEX, 1998              **
  95. '  ******************************
  96. '  ******************************
  97. Private Sub Command1_Click()
  98.     s$ = "<Country|^Athletes|^Gold|^Silver|^Bronze"
  99.     MSFlexGrid1.FormatString = s$
  100.     MSFlexGrid1.ColWidth(0) = TextWidth("UNITED STATES")
  101.     MSFlexGrid1.ColWidth(2) = MSFlexGrid1.ColWidth(4)
  102.     MSFlexGrid1.ColWidth(3) = MSFlexGrid1.ColWidth(4)
  103. End Sub
  104. Private Sub Command2_Click()
  105.     s$ = ";|Country|Athletes|Gold|Silver|Bronze"
  106.     MSFlexGrid1.FormatString = s$
  107. End Sub
  108. Private Sub Command3_Click()
  109.     s$ = "<Country|^Athletes|^Gold|^Silver|^Bronze;|"
  110.     s$ = s$ & "Argentina|Belgium | Denmark | Equador | France | Germany"
  111.     MSFlexGrid1.FormatString = s$
  112.     MSFlexGrid1.ColWidth(0) = TextWidth("UNITED STATES")
  113.     MSFlexGrid1.ColWidth(2) = MSFlexGrid1.ColWidth(4)
  114.     MSFlexGrid1.ColWidth(3) = MSFlexGrid1.ColWidth(4)
  115. End Sub
  116.