home *** CD-ROM | disk | FTP | other *** search
/ CD Shareware Magazine 1999 April / CD_Shareware_Magazine_31.iso / Free / Prg / VertMenu.exe / MenuItemObjects.pag < prev    next >
Encoding:
Text File  |  1997-02-28  |  4.1 KB  |  141 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
  3. Begin VB.PropertyPage MenuItemObjects 
  4.    Caption         =   "MenuItemObjects"
  5.    ClientHeight    =   3495
  6.    ClientLeft      =   0
  7.    ClientTop       =   0
  8.    ClientWidth     =   5925
  9.    PaletteMode     =   0  'Halftone
  10.    ScaleHeight     =   233
  11.    ScaleMode       =   3  'Pixel
  12.    ScaleWidth      =   395
  13.    Begin VB.TextBox txtMenuItemTag 
  14.       Height          =   330
  15.       Left            =   3240
  16.       TabIndex        =   6
  17.       Top             =   1155
  18.       Width           =   1830
  19.    End
  20.    Begin VB.TextBox txtMenuItemKey 
  21.       Height          =   330
  22.       Left            =   3240
  23.       TabIndex        =   4
  24.       Top             =   345
  25.       Width           =   1830
  26.    End
  27.    Begin VB.CommandButton cmdBrowse 
  28.       Caption         =   "Browse..."
  29.       Height          =   375
  30.       Left            =   990
  31.       TabIndex        =   3
  32.       Top             =   1395
  33.       Width           =   1365
  34.    End
  35.    Begin VB.TextBox txtMenuItemCaption 
  36.       Height          =   330
  37.       Left            =   90
  38.       TabIndex        =   1
  39.       Top             =   370
  40.       Width           =   1830
  41.    End
  42.    Begin MSComDlg.CommonDialog CommonDialog1 
  43.       Left            =   2025
  44.       Top             =   315
  45.       _ExtentX        =   847
  46.       _ExtentY        =   847
  47.       _Version        =   327680
  48.       CancelError     =   -1  'True
  49.       DefaultExt      =   "bmp"
  50.       DialogTitle     =   "Open Picture (bmp)"
  51.       FileName        =   "*.ico"
  52.       Filter          =   "IconFiles(*.ico)|*.ico"
  53.       FontSize        =   1.73989e-39
  54.    End
  55.    Begin VB.Label lblMenuItemTag 
  56.       Caption         =   "MenuItemTag:"
  57.       Height          =   240
  58.       Left            =   3240
  59.       TabIndex        =   7
  60.       Top             =   900
  61.       Width           =   1305
  62.    End
  63.    Begin VB.Label lblMenuItemKey 
  64.       Caption         =   "MenuItemKey:"
  65.       Height          =   240
  66.       Left            =   3240
  67.       TabIndex        =   5
  68.       Top             =   90
  69.       Width           =   1305
  70.    End
  71.    Begin VB.Image imgPicture 
  72.       Height          =   480
  73.       Left            =   180
  74.       Top             =   1350
  75.       Width           =   480
  76.    End
  77.    Begin VB.Label Label1 
  78.       AutoSize        =   -1  'True
  79.       Caption         =   "MenuItemPicture:"
  80.       Height          =   195
  81.       Left            =   180
  82.       TabIndex        =   2
  83.       Top             =   1125
  84.       Width           =   1245
  85.    End
  86.    Begin VB.Label lblMenuItemCaption 
  87.       Caption         =   "MenuItemCaption:"
  88.       Height          =   240
  89.       Left            =   90
  90.       TabIndex        =   0
  91.       Top             =   120
  92.       Width           =   1305
  93.    End
  94. End
  95. Attribute VB_Name = "MenuItemObjects"
  96. Attribute VB_GlobalNameSpace = False
  97. Attribute VB_Creatable = True
  98. Attribute VB_PredeclaredId = False
  99. Attribute VB_Exposed = True
  100. Option Explicit
  101.  
  102. Private Sub cmdBrowse_Click()
  103.     On Error Resume Next
  104.     CommonDialog1.ShowOpen
  105.     If Err.Number = 0 Then
  106.         imgPicture.Picture = LoadPicture(CommonDialog1.filename)
  107.         Changed = True
  108.     End If
  109. End Sub
  110.  
  111. Private Sub txtMenuItemCaption_Change()
  112.     On Error Resume Next
  113.     Changed = True
  114. End Sub
  115.  
  116. Private Sub PropertyPage_ApplyChanges()
  117.     On Error Resume Next
  118.     SelectedControls(0).MenuItemCaption = txtMenuItemCaption.Text
  119.     Set SelectedControls(0).MenuItemIcon = imgPicture.Picture
  120.     SelectedControls(0).MenuItemKey = txtMenuItemKey.Text
  121.     SelectedControls(0).MenuItemTag = txtMenuItemTag.Text
  122. End Sub
  123.  
  124. Private Sub PropertyPage_SelectionChanged()
  125.     On Error Resume Next
  126.     txtMenuItemCaption.Text = SelectedControls(0).MenuItemCaption
  127.     Set imgPicture.Picture = SelectedControls(0).MenuItemIcon
  128.     txtMenuItemKey.Text = SelectedControls(0).MenuItemKey
  129.     txtMenuItemTag.Text = SelectedControls(0).MenuItemTag
  130. End Sub
  131.  
  132. Private Sub txtMenuItemKey_Change()
  133.     On Error Resume Next
  134.     Changed = True
  135. End Sub
  136.  
  137. Private Sub txtMenuItemTag_Change()
  138.     On Error Resume Next
  139.     Changed = True
  140. End Sub
  141.