home *** CD-ROM | disk | FTP | other *** search
- ' ********************************************************
- ' MDI Standard Application Shell
- ' ********************************************************
- '
- ' SUMMARY
- ' -------
- ' This file is part of an MDI application "skeleton"
- ' created by John Blessing of Leigh Business Enterprises Ltd.
- '
- ' FEATURES
- ' --------
- ' Selection of application database.
- ' Compact/Repair of database.
- ' 'Helptips' on toolbar items.
- ' Support for Help files.
- ' MDI child forms tiling etc.
- ' Error trapping.
- ' 'Nag' screen support for shareware authors.
- ' Support for 3D dialogs (switched off in design mode
- ' to prevent GPFs)
- '
- ' USE
- ' ---
- ' You need VB Pro to use this shell, although it could be
- ' modified to run under the standard edition.
- '
- ' You will need to set up some information in APP.BAS,
- ' particularly in SetAppInfo(). You will also need to add
- ' your own application specific code to this module.
- '
- ' DISTRIBUTION
- ' ------------
- ' This program is "FreeWare" and may be used and distributed
- ' as you wish.
- '
- ' It incorporates some ideas/code from other authors and these
- ' are acknowledged in the appropriate module.
- '
- ' We hope that you will find it useful. If you wish to discuss it
- ' then please e-mail us on Compuserve 100444,623.
- '
- ' ADVERTISEMENT!
- ' --------------
- ' Are you looking for a helpdesk system? Or does your company
- ' want to track and monitor the progress of any work activity?
- ' We market a system which could be of interest to you.
- '
- ' PROGRESS is available for download from the Business section
- ' of the Windows Shareware forum on Compuserve
- ' (filename PRGRSS10.ZIP). It's a large program, so in the
- ' same section you will also find the help files and
- ' documentation as PRGSSDOC.ZIP which is quicker to download
- ' and will give you a good idea of the functionality of PROGRESS.
- '
- ' Dec 1994
- '
- 'This function is a modified version of one downloaded from Compuserve, but
- 'I don't know the original author.
- Option Explicit
-
- ' Subroutine to show popup help for a toolbar button
- ' To use:
- ' add a label to the form
- ' Set toolbar button tag property to help message desired
- ' Copy this subroutine to the form code and uncomment code below
- ' In mousemove event of control add
- ' HelpTip Index, label-name, x, y
- ' In click event or other events of control that cause action add
- ' HelpTip Index, label-name, 0, 0 ' Hides help
- Sub HelpTip (Index As Integer, HelpLabel As Label, px As Single, py As Single)
-
- Dim maxx As Single, maxy As Single
- Dim nPnlTop As Single, nPnlLeft As Single
-
- ' Determine max x & y coordinates with 80 twip border
- ' boundry of 80 twips allowed to be able to catch cursor as exiting control
- maxx = mdiMain!Toolbar(Index).Width - 80
- maxy = mdiMain!Toolbar(Index).Height - 80
- ' if exiting control area turn off help panel
- If px < 80 Or py < 80 Or px > maxx Or py > maxy Then
- HelpLabel.Visible = False
- HelpLabel.Caption = ""
- Exit Sub
- End If
-
- ' get help msg from control's tag and
- HelpLabel.Caption = mdiMain!Toolbar(Index).Tag
-
- ' Determine location for help panel
- ' Assume to the right of the last toolbar button
- nPnlTop = mdiMain!Toolbar(Index).Top
- nPnlLeft = mdiMain!Toolbar(0).Left + (mdiMain!Toolbar(Index).Width * (tGApp.iToolButtonCount)) + 40
- ' Put panel to left of first toolbar button if not enough room
- If nPnlLeft + HelpLabel.Width > HelpLabel.Parent.ScaleWidth Then
- nPnlLeft = mdiMain!Toolbar(0).Left - HelpLabel.Width - 40
- End If
-
- ' if same settings exit to prevent flickering effect
- If HelpLabel.Caption = mdiMain!Toolbar(Index).Tag And HelpLabel.Top = nPnlTop And HelpLabel.Left = nPnlLeft Then
- Exit Sub
- End If
-
- 'position help panel
- HelpLabel.Top = nPnlTop
- HelpLabel.Left = nPnlLeft
- HelpLabel.Visible = True
-
- End Sub
-
-