home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 June / Chip_2002-06_cd1.bin / zkuste / vbasic / Data / Utils / fstrip5.exe / %MAINDIR% / FlatStripDemonstration.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2002-04-18  |  5.9 KB  |  170 lines

  1. VERSION 5.00
  2. Object = "{9973B72E-F1FF-4E96-AA76-225706910672}#4.6#0"; "FlatStrip5.ocx"
  3. Begin VB.Form frmMenu 
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "Ariad FlatStrip 5.1 Demonstration"
  6.    ClientHeight    =   5100
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   5955
  10.    BeginProperty Font 
  11.       Name            =   "Tahoma"
  12.       Size            =   8.25
  13.       Charset         =   0
  14.       Weight          =   400
  15.       Underline       =   0   'False
  16.       Italic          =   0   'False
  17.       Strikethrough   =   0   'False
  18.    EndProperty
  19.    Icon            =   "FlatStripDemonstration.frx":0000
  20.    LinkTopic       =   "Form1"
  21.    MaxButton       =   0   'False
  22.    MinButton       =   0   'False
  23.    ScaleHeight     =   340
  24.    ScaleMode       =   3  'Pixel
  25.    ScaleWidth      =   397
  26.    StartUpPosition =   2  'CenterScreen
  27.    Begin FlatStripCtl.FlatStrip fstMenu 
  28.       Height          =   330
  29.       Left            =   1755
  30.       Top             =   4500
  31.       Width           =   3975
  32.       _ExtentX        =   7011
  33.       _ExtentY        =   582
  34.       AutoSize        =   1
  35.       ShowClientArea  =   0   'False
  36.       Alignment       =   1
  37.       Style           =   1
  38.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  39.          Name            =   "Tahoma"
  40.          Size            =   9.75
  41.          Charset         =   0
  42.          Weight          =   400
  43.          Underline       =   0   'False
  44.          Italic          =   0   'False
  45.          Strikethrough   =   0   'False
  46.       EndProperty
  47.       TabCount        =   3
  48.       Tab1Caption     =   "&Show"
  49.       Tab1Key         =   "Show"
  50.       Tab2Caption     =   "&About"
  51.       Tab2Key         =   "About"
  52.       Tab3Caption     =   "E&xit"
  53.       Tab3Key         =   "Exit"
  54.    End
  55.    Begin VB.ListBox lstDemo 
  56.       Height          =   2550
  57.       IntegralHeight  =   0   'False
  58.       ItemData        =   "FlatStripDemonstration.frx":014A
  59.       Left            =   1755
  60.       List            =   "FlatStripDemonstration.frx":0170
  61.       TabIndex        =   1
  62.       Top             =   1755
  63.       Width           =   3975
  64.    End
  65.    Begin FlatStripDemonstration.pucTextTip pucTextTip1 
  66.       Height          =   600
  67.       Left            =   1755
  68.       TabIndex        =   0
  69.       Top             =   135
  70.       Width           =   4020
  71.       _ExtentX        =   7091
  72.       _ExtentY        =   1058
  73.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  74.          Name            =   "Tahoma"
  75.          Size            =   8.25
  76.          Charset         =   0
  77.          Weight          =   700
  78.          Underline       =   0   'False
  79.          Italic          =   0   'False
  80.          Strikethrough   =   0   'False
  81.       EndProperty
  82.       Text            =   "Welcome to the demonstration program for Ariad FlatStrip Control 5.1."
  83.    End
  84.    Begin VB.Label lblHdr 
  85.       AutoSize        =   -1  'True
  86.       Caption         =   "Please select the demonstration you wish to view from the list below:"
  87.       Height          =   390
  88.       Index           =   2
  89.       Left            =   1755
  90.       TabIndex        =   3
  91.       Top             =   900
  92.       Width           =   2805
  93.       WordWrap        =   -1  'True
  94.    End
  95.    Begin VB.Label lblHdr 
  96.       AutoSize        =   -1  'True
  97.       Caption         =   "Available &Demonstrations:"
  98.       Height          =   195
  99.       Index           =   1
  100.       Left            =   1755
  101.       TabIndex        =   2
  102.       Top             =   1530
  103.       Width           =   1875
  104.    End
  105.    Begin FlatStripDemonstration.pucLogoPane pucLogoPane1 
  106.       Align           =   3  'Align Left
  107.       Height          =   5100
  108.       Left            =   0
  109.       Top             =   0
  110.       Width           =   1500
  111.       _ExtentX        =   2646
  112.       _ExtentY        =   8996
  113.       Picture         =   "FlatStripDemonstration.frx":028A
  114.    End
  115. Attribute VB_Name = "frmMenu"
  116. Attribute VB_GlobalNameSpace = False
  117. Attribute VB_Creatable = False
  118. Attribute VB_PredeclaredId = True
  119. Attribute VB_Exposed = False
  120. Option Explicit
  121. Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
  122. Private Const LB_SETHORIZONTALEXTENT = &H194
  123. Private Const LB_GETHORIZONTALEXTENT = &H193
  124. Private Sub Form_Load()
  125.     Dim Width       As Long
  126.     Dim IndexLoop   As Integer
  127.     Dim Data        As String
  128.     'add a horizontal scrollbar
  129.     For IndexLoop = 0 To lstDemo.ListCount - 1
  130.         Data = lstDemo.List(IndexLoop)
  131.         Width = SendMessage(lstDemo.hWnd, LB_GETHORIZONTALEXTENT, 0, 0)
  132.         If TextWidth(Data) + 40 > Width Then
  133.             SendMessage lstDemo.hWnd, LB_SETHORIZONTALEXTENT, ByVal TextWidth(Data) + 40, ByVal 0&
  134.         End If
  135.     Next
  136.     'select first item
  137.     lstDemo.ListIndex = 0
  138. End Sub
  139. Private Sub fstMenu_TabClick(FlatTab As FlatStripCtl.FlatTab)
  140.     Select Case FlatTab.Key
  141.         Case "Show"
  142.             Select Case lstDemo.ItemData(lstDemo.ListIndex)
  143.                 Case 0: frmGeneral.Show 1
  144.                 Case 1: frmFlatTabsCollection.Show 1
  145.                 Case 2: frmFlatTabObject.Show 1
  146.                 Case 3: frmCollectionString.Show 1
  147.                 Case 4: frmClientArea.Show 1
  148.                 Case 5: frmElements.Show 1
  149.                 Case 6: frmAutoSize.Show 1
  150.                 Case 7: frmColors.Show 1
  151.                 Case 8: frmScrollBox.Show 1
  152.                 Case 9: frmPictures.Show 1
  153.                 Case 10: frmDisplayStyles.Show 1
  154.             End Select
  155.         Case "About"
  156.             fstMenu.About
  157.         Case "Exit"
  158.             Unload Me
  159.     End Select
  160. End Sub
  161. Private Sub lstDemo_DblClick()
  162.     'force the "button" to be clicked
  163.     fstMenu.ForceAction fsfaTabClick, "Show"
  164. End Sub
  165. Private Sub lstDemo_KeyPress(KeyAscii As Integer)
  166.     If KeyAscii = vbKeyReturn Then
  167.         lstDemo_DblClick
  168.     End If
  169. End Sub
  170.