home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.MDIForm mdiOLE
- BackColor = &H00C0C0C0&
- Caption = "OLE Container Control Example"
- ClientHeight = 4170
- ClientLeft = 375
- ClientTop = 1845
- ClientWidth = 5790
- Height = 4860
- Icon = "MDIOLE.frx":0000
- Left = 315
- LinkTopic = "MDIForm1"
- Top = 1215
- Width = 5910
- Begin VB.PictureBox StatusBar
- Align = 2 'Align Bottom
- Appearance = 0 'Flat
- BackColor = &H00C0C0C0&
- ForeColor = &H80000008&
- Height = 420
- Left = 0
- ScaleHeight = 390
- ScaleWidth = 5760
- TabIndex = 1
- Top = 3750
- Width = 5790
- Begin VB.Label lblStatus
- BackStyle = 0 'Transparent
- Caption = "Ready"
- Height = 240
- Left = 90
- TabIndex = 2
- Top = 90
- Width = 5505
- End
- End
- Begin VB.PictureBox Toolbar
- Align = 1 'Align Top
- Appearance = 0 'Flat
- BackColor = &H00C0C0C0&
- ForeColor = &H80000008&
- Height = 420
- Left = 0
- ScaleHeight = 390
- ScaleWidth = 5760
- TabIndex = 0
- Top = 0
- Width = 5790
- Begin MSComDlg.CommonDialog cdlg
- Left = 1440
- Top = 0
- _Version = 65536
- _ExtentX = 847
- _ExtentY = 847
- _StockProps = 0
- DefaultExt = "ole"
- Filter = "OLE Object (*.ole)|*.ole|All Files (*.*)|*.*"
- FilterIndex = 1
- End
- Begin VB.Image imgHold
- Height = 315
- Left = 900
- Top = 45
- Visible = 0 'False
- Width = 360
- End
- Begin VB.Image imgTools
- Height = 330
- Index = 1
- Left = 495
- Picture = "MDIOLE.frx":030A
- Top = 45
- Visible = 0 'False
- Width = 360
- End
- Begin VB.Image imgTools
- Height = 330
- Index = 0
- Left = 90
- Picture = "MDIOLE.frx":0494
- Top = 45
- Width = 360
- End
- End
- Begin VB.Menu mnuFile
- Caption = "&File"
- NegotiatePosition= 1 'Left
- Begin VB.Menu mnuFileItems
- Caption = "E&xit"
- Index = 1
- End
- End
- Attribute VB_Name = "mdiOLE"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- '*********************************************************************
- ' MDIOLE.FRM - MDI Parent Form
- '*********************************************************************
- Option Explicit
- '*********************************************************************
- ' Saves the button image in imgHold, and inserts the down picture
- '*********************************************************************
- Private Sub imgTools_MouseDown(Index As Integer, Button As Integer, _
- Shift As Integer, X As Single, Y As Single)
- imgHold.picture = imgTools(Index).picture
- imgTools(Index).picture = imgTools(Index + 1).picture
- End Sub
- '*********************************************************************
- ' Updates the status bar
- '*********************************************************************
- Private Sub imgTools_MouseMove(Index As Integer, Button As Integer, _
- Shift As Integer, X As Single, Y As Single)
- UpdateStatus lblStatus, "Closes " & Caption
- End Sub
- '*********************************************************************
- ' Restores the graphic, and closes the application
- '*********************************************************************
- Private Sub imgTools_MouseUp(Index As Integer, Button As Integer, _
- Shift As Integer, X As Single, Y As Single)
- imgTools(Index).picture = imgHold.picture
- Unload Me
- End Sub
- '*********************************************************************
- ' Prepares the application for use
- '*********************************************************************
- Private Sub MDIForm_Load()
- BackColor = vb3DFace
- Toolbar.BackColor = vb3DFace
- StatusBar.BackColor = vb3DFace
- WindowState = 2
- frmWord.Show
- Arrange vbTileHorizontal
- End Sub
- '*********************************************************************
- ' Updates the status bar with the default text
- '*********************************************************************
- Private Sub MDIForm_MouseMove(Button As Integer, Shift As Integer, _
- X As Single, Y As Single)
- UpdateStatus lblStatus
- End Sub
- '*********************************************************************
- ' Terminates the application
- '*********************************************************************
- Private Sub mnuFileItems_Click(Index As Integer)
- Unload Me
- End Sub
- '*********************************************************************
- ' Updates the status bar with the default text
- '*********************************************************************
- Private Sub StatusBar_MouseMove(Button As Integer, Shift As Integer, _
- X As Single, Y As Single)
- UpdateStatus lblStatus
- End Sub
- '*********************************************************************
- ' Adds a 3D appearance to the status bar
- '*********************************************************************
- Private Sub StatusBar_Paint()
- HighlightBar StatusBar
- Highlight lblStatus
- End Sub
- '*********************************************************************
- ' Updates the status bar with the default text
- '*********************************************************************
- Private Sub Toolbar_MouseMove(Button As Integer, Shift As Integer, _
- X As Single, Y As Single)
- UpdateStatus lblStatus
- End Sub
- '*********************************************************************
- ' Adds a 3D appearance to the toolbar
- '*********************************************************************
- Private Sub Toolbar_Paint()
- HighlightBar Toolbar
- End Sub
- '*********************************************************************
- ' Adds a 3D effect to a picture box
- '*********************************************************************
- Private Sub HighlightBar(Bar As PictureBox)
- Bar.Line (0, 5)-(Bar.ScaleWidth, 5), vb3DHighlight
- Bar.Line (0, Bar.ScaleHeight - 15)-(Bar.ScaleWidth, _
- Bar.ScaleHeight - 15), vb3DShadow
- End Sub
- '*********************************************************************
- ' Adds a 3D border around a control
- '*********************************************************************
- Private Sub Highlight(Object As Control)
- Const HORIZONTAL_OFFSET = 50
- Const VERTICAL_OFFSET = 70
- '*****************************************************
- ' Top
- '*****************************************************
- StatusBar.Line (Object.Left - HORIZONTAL_OFFSET, _
- Object.TOP - HORIZONTAL_OFFSET)- _
- (Object.Width, _
- Object.TOP - HORIZONTAL_OFFSET), _
- vb3DShadow
- '*****************************************************
- ' Left
- '*****************************************************
- StatusBar.Line (Object.Left - HORIZONTAL_OFFSET, _
- Object.TOP - HORIZONTAL_OFFSET)- _
- (Object.Left - HORIZONTAL_OFFSET, _
- Object.Height + VERTICAL_OFFSET), _
- vb3DShadow
- '*****************************************************
- ' Bottom
- '*****************************************************
- StatusBar.Line (Object.Left - HORIZONTAL_OFFSET, _
- Object.Height + VERTICAL_OFFSET)- _
- (Object.Width, _
- Object.Height + VERTICAL_OFFSET), _
- vb3DHighlight
- '*****************************************************
- ' Right
- '*****************************************************
- StatusBar.Line (Object.Width, _
- Object.TOP - HORIZONTAL_OFFSET)- _
- (Object.Width, _
- Object.Height + VERTICAL_OFFSET + 15), _
- vb3DHighlight
- End Sub
-