home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 June / Chip_2002-06_cd1.bin / zkuste / vbasic / Data / Utils / cmdbtnx5.msi / Cabs.w1.cab / TransparentButtons.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-08-01  |  8.4 KB  |  238 lines

  1. VERSION 5.00
  2. Object = "{20976770-692B-4564-84B5-CCC822AA2B7A}#1.4#0"; "CMDBTNX5.OCX"
  3. Begin VB.Form frmTransparentButtons 
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "Transparent Buttons Demonstration"
  6.    ClientHeight    =   5040
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   7485
  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            =   "TransparentButtons.frx":0000
  20.    LinkTopic       =   "Form1"
  21.    MaxButton       =   0   'False
  22.    MinButton       =   0   'False
  23.    ScaleHeight     =   336
  24.    ScaleMode       =   3  'Pixel
  25.    ScaleWidth      =   499
  26.    StartUpPosition =   2  'CenterScreen
  27.    Begin VB.ComboBox cboBackStyle 
  28.       Height          =   315
  29.       ItemData        =   "TransparentButtons.frx":014A
  30.       Left            =   3240
  31.       List            =   "TransparentButtons.frx":0154
  32.       Style           =   2  'Dropdown List
  33.       TabIndex        =   7
  34.       Top             =   2835
  35.       Width           =   1815
  36.    End
  37.    Begin CommandButtonXDemo.pucTextTip pucTextTip1 
  38.       Height          =   1410
  39.       Left            =   3240
  40.       TabIndex        =   2
  41.       Top             =   990
  42.       Width           =   4020
  43.       _ExtentX        =   7091
  44.       _ExtentY        =   2487
  45.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  46.          Name            =   "Tahoma"
  47.          Size            =   8.25
  48.          Charset         =   0
  49.          Weight          =   400
  50.          Underline       =   0   'False
  51.          Italic          =   0   'False
  52.          Strikethrough   =   0   'False
  53.       EndProperty
  54.       Text            =   $"TransparentButtons.frx":016D
  55.    End
  56.    Begin VB.PictureBox picTile 
  57.       Align           =   3  'Align Left
  58.       AutoRedraw      =   -1  'True
  59.       BorderStyle     =   0  'None
  60.       Height          =   4260
  61.       Left            =   0
  62.       ScaleHeight     =   284
  63.       ScaleMode       =   3  'Pixel
  64.       ScaleWidth      =   200
  65.       TabIndex        =   1
  66.       Top             =   780
  67.       Width           =   3000
  68.       Begin CommandButtonXCtl.CommandButtonX btnDemo 
  69.          Height          =   1185
  70.          Index           =   0
  71.          Left            =   900
  72.          TabIndex        =   3
  73.          Top             =   180
  74.          Width           =   1185
  75.          _ExtentX        =   2090
  76.          _ExtentY        =   2090
  77.          BackStyle       =   0
  78.          DropDownPicture =   "TransparentButtons.frx":0271
  79.          Caption         =   ""
  80.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  81.             Name            =   "Tahoma"
  82.             Size            =   8.25
  83.             Charset         =   0
  84.             Weight          =   400
  85.             Underline       =   0   'False
  86.             Italic          =   0   'False
  87.             Strikethrough   =   0   'False
  88.          EndProperty
  89.          HighlightColor  =   -2147483632
  90.          HighlightDkColor=   -2147483628
  91.          Picture         =   "TransparentButtons.frx":02F3
  92.       End
  93.       Begin CommandButtonXCtl.CommandButtonX btnDemo 
  94.          Height          =   1185
  95.          Index           =   1
  96.          Left            =   885
  97.          TabIndex        =   4
  98.          Top             =   1485
  99.          Width           =   1185
  100.          _ExtentX        =   2090
  101.          _ExtentY        =   2090
  102.          BackStyle       =   0
  103.          DropDownPicture =   "TransparentButtons.frx":0BCD
  104.          Caption         =   ""
  105.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  106.             Name            =   "Tahoma"
  107.             Size            =   8.25
  108.             Charset         =   0
  109.             Weight          =   400
  110.             Underline       =   0   'False
  111.             Italic          =   0   'False
  112.             Strikethrough   =   0   'False
  113.          EndProperty
  114.          HighlightColor  =   -2147483632
  115.          HighlightDkColor=   -2147483628
  116.          Picture         =   "TransparentButtons.frx":0C4F
  117.       End
  118.       Begin CommandButtonXCtl.CommandButtonX btnDemo 
  119.          Height          =   1185
  120.          Index           =   2
  121.          Left            =   885
  122.          TabIndex        =   5
  123.          Top             =   2835
  124.          Width           =   1185
  125.          _ExtentX        =   2090
  126.          _ExtentY        =   2090
  127.          BackStyle       =   0
  128.          DropDownPicture =   "TransparentButtons.frx":1529
  129.          Caption         =   ""
  130.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  131.             Name            =   "Tahoma"
  132.             Size            =   8.25
  133.             Charset         =   0
  134.             Weight          =   400
  135.             Underline       =   0   'False
  136.             Italic          =   0   'False
  137.             Strikethrough   =   0   'False
  138.          EndProperty
  139.          HighlightColor  =   -2147483632
  140.          HighlightDkColor=   -2147483628
  141.          Picture         =   "TransparentButtons.frx":15AB
  142.       End
  143.    End
  144.    Begin CommandButtonXCtl.CommandButtonX cmdClose 
  145.       Cancel          =   -1  'True
  146.       Default         =   -1  'True
  147.       Height          =   375
  148.       Left            =   6120
  149.       TabIndex        =   0
  150.       Tag             =   "Close this demonstration window"
  151.       Top             =   4410
  152.       Width           =   1140
  153.       _ExtentX        =   2011
  154.       _ExtentY        =   661
  155.       DropDownPicture =   "TransparentButtons.frx":1E85
  156.       CaptionOffsetX  =   8
  157.       PictureAlignment=   3
  158.       Caption         =   "C&lose"
  159.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  160.          Name            =   "Tahoma"
  161.          Size            =   8.25
  162.          Charset         =   0
  163.          Weight          =   400
  164.          Underline       =   0   'False
  165.          Italic          =   0   'False
  166.          Strikethrough   =   0   'False
  167.       EndProperty
  168.       Picture         =   "TransparentButtons.frx":1F07
  169.    End
  170.    Begin CommandButtonXDemo.pucTextTip pucTextTip2 
  171.       Height          =   1005
  172.       Left            =   3240
  173.       TabIndex        =   8
  174.       Top             =   3285
  175.       Width           =   4020
  176.       _ExtentX        =   7091
  177.       _ExtentY        =   1773
  178.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  179.          Name            =   "Tahoma"
  180.          Size            =   8.25
  181.          Charset         =   0
  182.          Weight          =   400
  183.          Underline       =   0   'False
  184.          Italic          =   0   'False
  185.          Strikethrough   =   0   'False
  186.       EndProperty
  187.       Text            =   $"TransparentButtons.frx":2061
  188.    End
  189.    Begin VB.Label lblHdr 
  190.       AutoSize        =   -1  'True
  191.       Caption         =   "&BackStyle:"
  192.       Height          =   195
  193.       Left            =   3240
  194.       TabIndex        =   6
  195.       Top             =   2610
  196.       Width           =   750
  197.    End
  198.    Begin CommandButtonXDemo.pucLogoPane LogoPane1 
  199.       Align           =   1  'Align Top
  200.       Height          =   780
  201.       Left            =   0
  202.       Top             =   0
  203.       Width           =   7485
  204.       _ExtentX        =   13203
  205.       _ExtentY        =   1376
  206.       Picture         =   "TransparentButtons.frx":210E
  207.    End
  208. Attribute VB_Name = "frmTransparentButtons"
  209. Attribute VB_GlobalNameSpace = False
  210. Attribute VB_Creatable = False
  211. Attribute VB_PredeclaredId = True
  212. Attribute VB_Exposed = False
  213. Option Explicit
  214. Private Sub cboBackStyle_Click()
  215.     Dim IndexLoop       As Integer
  216.     For IndexLoop = 0 To btnDemo.UBound
  217.         btnDemo(IndexLoop).BackStyle = cboBackStyle.ListIndex
  218.     Next
  219. End Sub
  220. Private Sub cmdClose_Click()
  221.     Unload Me
  222. End Sub
  223. Private Sub Form_Load()
  224.     Dim X       As Long
  225.     Dim Y       As Long
  226.     Dim Picture As StdPicture
  227.     'tile a bitmap using PaintPicture...
  228.     'it's slower than using the API
  229.     'but easier to implement in a demo
  230.     Set Picture = LoadPicture(App.Path & "\Tile.bmp")
  231.     For X = 0 To picTile.ScaleWidth Step ScaleX(Picture.Width, vbHimetric, vbPixels)
  232.         For Y = 0 To picTile.ScaleHeight Step ScaleY(Picture.Height, vbHimetric, vbPixels)
  233.             picTile.PaintPicture Picture, X, Y
  234.         Next
  235.     Next
  236.     cboBackStyle.ListIndex = 0
  237. End Sub
  238.