home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.1#0"; "COMCTL32.OCX"
- Begin VB.Form frmConfig
- Caption = "Current Configuration"
- ClientHeight = 6555
- ClientLeft = 2115
- ClientTop = 915
- ClientWidth = 2370
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- OLEDropMode = 1 'Manual
- ScaleHeight = 6555
- ScaleWidth = 2370
- Begin ComctlLib.Toolbar Toolbar1
- Align = 1 'Align Top
- Height = 420
- Left = 0
- TabIndex = 4
- Top = 0
- Width = 2370
- _ExtentX = 4180
- _ExtentY = 741
- ButtonWidth = 609
- ButtonHeight = 582
- Appearance = 1
- ImageList = "ImageList1"
- _Version = 327680
- BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7}
- NumButtons = 1
- BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Rollup"
- Object.Tag = ""
- ImageIndex = 1
- Style = 1
- EndProperty
- EndProperty
- MouseIcon = "frmConfig.frx":0000
- End
- Begin ComctlLib.TreeView TreeView1
- Height = 2772
- Left = 0
- TabIndex = 0
- Top = 360
- Width = 2292
- _ExtentX = 4048
- _ExtentY = 4895
- _Version = 327680
- HideSelection = 0 'False
- Indentation = 176
- LabelEdit = 1
- LineStyle = 1
- Style = 7
- ImageList = "ImageList1"
- Appearance = 1
- MouseIcon = "frmConfig.frx":001C
- OLEDragMode = 1
- End
- Begin VB.PictureBox picSplitter
- BackColor = &H00808080&
- BorderStyle = 0 'None
- FillColor = &H00808080&
- Height = 50
- Left = -480
- ScaleHeight = 20.848
- ScaleMode = 0 'User
- ScaleWidth = 29328
- TabIndex = 3
- Top = 6000
- Visible = 0 'False
- Width = 4512
- End
- Begin ComctlLib.StatusBar StatusBar1
- Align = 2 'Align Bottom
- Height = 360
- Left = 0
- TabIndex = 2
- Top = 6195
- Width = 2370
- _ExtentX = 4180
- _ExtentY = 635
- SimpleText = "None"
- _Version = 327680
- BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7}
- NumPanels = 2
- BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7}
- AutoSize = 2
- Object.Width = 1773
- MinWidth = 1764
- TextSave = ""
- Key = ""
- Object.Tag = ""
- EndProperty
- BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7}
- TextSave = ""
- Key = ""
- Object.Tag = ""
- EndProperty
- EndProperty
- MouseIcon = "frmConfig.frx":0038
- OLEDropMode = 1
- End
- Begin ComctlLib.ListView ListView1
- Height = 1812
- Left = 0
- TabIndex = 1
- Top = 3240
- Width = 2292
- _ExtentX = 4048
- _ExtentY = 3201
- View = 3
- LabelEdit = 1
- LabelWrap = -1 'True
- HideSelection = 0 'False
- _Version = 327680
- ForeColor = -2147483640
- BackColor = -2147483643
- BorderStyle = 1
- Appearance = 1
- MouseIcon = "frmConfig.frx":0054
- NumItems = 2
- BeginProperty ColumnHeader(1) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
- Key = "Prop"
- Object.Tag = ""
- Text = "Property"
- Object.Width = 1764
- EndProperty
- BeginProperty ColumnHeader(2) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
- SubItemIndex = 1
- Key = "Value"
- Object.Tag = ""
- Text = "Value"
- Object.Width = 2540
- EndProperty
- End
- Begin VB.Image imgSplitter
- Height = 50
- Left = 0
- MousePointer = 7 'Size N S
- Top = 3120
- Width = 3516
- End
- Begin ComctlLib.ImageList ImageList1
- Left = 1320
- Top = 5160
- _ExtentX = 794
- _ExtentY = 794
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 327680
- BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
- NumListImages = 7
- BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmConfig.frx":0070
- Key = "Up"
- EndProperty
- BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmConfig.frx":038A
- Key = "Open"
- EndProperty
- BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmConfig.frx":06A4
- Key = "Close"
- EndProperty
- BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmConfig.frx":09BE
- Key = "Hutch"
- EndProperty
- BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmConfig.frx":0CD8
- Key = "DoorChest"
- EndProperty
- BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmConfig.frx":0FF2
- Key = "Dresser"
- EndProperty
- BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmConfig.frx":130C
- Key = "Desk"
- EndProperty
- EndProperty
- End
- Attribute VB_Name = "frmConfig"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- ' -----------------------------------------------------------------------------
- ' Copyright (C) 1997 Visio Corporation. All rights reserved.
- ' You have a royalty-free right to use, modify, reproduce and distribute
- ' the Sample Application Files (and/or any modified version) in any way
- ' you find useful, provided that you agree that Visio has no warranty,
- ' obligations or liability for any Sample Application Files.
- ' -----------------------------------------------------------------------------
- Option Explicit
- ' SetWindowPos() hwndInsertAfter values
- Const HWND_TOPMOST = -1
- ' SetWindowPos Flags
- Const SWP_NOSIZE = &H1
- Const SWP_NOMOVE = &H2
- Public tvcProduct As ProductView
- Dim mbMoving As Boolean
- Dim oldHeight As Single
- Dim hidden As Boolean
- Const sglSplitLimit = 1000
- Private Sub Form_load()
- Dim ret As Long
- Dim flags As Long
- 'Force the form window to always remain on top
- flags = SWP_NOSIZE Or SWP_NOMOVE
- ret = SetWindowPos(Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, flags)
- End Sub
- Private Sub Form_Resize()
- 'Resize the form
- On Error Resume Next
- If Not hidden Then
- If Me.Height < 2500 Then Me.Height = 2500
- SizeControls imgSplitter.Top
- End If
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- Unload Me
- End Sub
- Private Sub imgSplitter_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
- 'The form window shows two lists, the list of objects and a
- 'selected objects properties list. The portion of the form used
- 'by each list can be modified by moving the imgSplitter. By detecting
- 'MouseDown, MouseMove, and MouseUp events the size of the two lists
- 'can be modified together and controlled by the position of the
- 'imgSplitter.
- With imgSplitter
- picSplitter.Move .Left, .Top, .Width, .Height
- End With
- picSplitter.Visible = True
- mbMoving = True
- End Sub
- Private Sub imgSplitter_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
- 'See MouseDown
- Dim sglPos As Single
- If mbMoving Then
- sglPos = y + imgSplitter.Top
- If sglPos < sglSplitLimit Then
- picSplitter.Top = sglSplitLimit
- ElseIf sglPos > Height - sglSplitLimit Then
- picSplitter.Top = Height - sglSplitLimit
- Else
- picSplitter.Top = sglPos
- End If
- End If
- End Sub
- Private Sub imgSplitter_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
- 'See MouseDown
- SizeControls picSplitter.Top
- picSplitter.Visible = False
- mbMoving = False
- End Sub
- Sub SizeControls(y As Single)
- 'Called on form resizing
- On Error Resume Next
- If Not hidden Then
- 'set the Height
- Toolbar1.Width = Me.ScaleWidth
- imgSplitter.Width = Me.ScaleWidth
- imgSplitter.Top = y
- With TreeView1
- .Top = Toolbar1.Height
- .Width = Me.ScaleWidth
- .Height = y - Toolbar1.Height
- End With
- With ListView1
- .Top = y + imgSplitter.Height
- .Width = Me.ScaleWidth
- .Height = Me.ScaleHeight - .Top - StatusBar1.Height
- End With
- End If
- End Sub
- Private Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button)
- 'Minimize the form selecting the toolbar button
- Select Case Button.Key
- Case "Rollup"
- If Button.Value = tbrPressed Then
- oldHeight = frmConfig.Height
- hidden = True
- frmConfig.Height = (frmConfig.Height - frmConfig.ScaleHeight) + Toolbar1.Height
- Else
- hidden = False
- frmConfig.Height = oldHeight
- Call Form_Resize
- End If
- Case Else
- End Select
- End Sub
- Private Sub TreeView1_Click()
- 'The user has selected an item from the list
- tvcProduct.ClickedOnNode TreeView1.SelectedItem.Key
- End Sub
-