home *** CD-ROM | disk | FTP | other *** search
/ Dan Appleman's Visual Bas…s Guide to the Win32 API / Dan.Applmans.Visual.Basic.5.0.Programmers.Guide.To.The.Win32.API.1997.Ziff-Davis.Press.CD / VB5PG32.mdf / articles / vbbultn / source / mainmdi2.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-12-21  |  9.6 KB  |  290 lines

  1. VERSION 2.00
  2. Begin MDIForm MDIForm1 
  3.    Caption         =   "MDIForm1"
  4.    ClientHeight    =   3900
  5.    ClientLeft      =   2205
  6.    ClientTop       =   1980
  7.    ClientWidth     =   5310
  8.    Height          =   4590
  9.    Left            =   2145
  10.    LinkTopic       =   "MDIForm1"
  11.    Top             =   1350
  12.    Width           =   5430
  13.    Begin PictureBox StatusBarPic 
  14.       Align           =   2  'Align Bottom
  15.       BackColor       =   &H00C0C0C0&
  16.       Height          =   360
  17.       Left            =   0
  18.       ScaleHeight     =   330
  19.       ScaleWidth      =   5280
  20.       TabIndex        =   1
  21.       Top             =   3540
  22.       Width           =   5310
  23.       Begin Label StatusLab 
  24.          AutoSize        =   -1  'True
  25.          BackColor       =   &H00C0C0C0&
  26.          FontBold        =   0   'False
  27.          FontItalic      =   0   'False
  28.          FontName        =   "MS Sans Serif"
  29.          FontSize        =   8.25
  30.          FontStrikethru  =   0   'False
  31.          FontUnderline   =   0   'False
  32.          Height          =   195
  33.          Left            =   60
  34.          TabIndex        =   2
  35.          Top             =   60
  36.          Width           =   45
  37.       End
  38.    End
  39.    Begin PictureBox ToolbarPic 
  40.       Align           =   1  'Align Top
  41.       BackColor       =   &H00C0C0C0&
  42.       Height          =   525
  43.       Left            =   0
  44.       ScaleHeight     =   495
  45.       ScaleWidth      =   5280
  46.       TabIndex        =   0
  47.       Top             =   0
  48.       Width           =   5310
  49.       Begin PictureBox Picture1 
  50.          AutoSize        =   -1  'True
  51.          BorderStyle     =   0  'None
  52.          Height          =   330
  53.          Index           =   11
  54.          Left            =   4470
  55.          Picture         =   MAINMDI2.FRX:0000
  56.          ScaleHeight     =   330
  57.          ScaleWidth      =   360
  58.          TabIndex        =   14
  59.          Top             =   60
  60.          Width           =   360
  61.       End
  62.       Begin PictureBox Picture1 
  63.          AutoSize        =   -1  'True
  64.          BorderStyle     =   0  'None
  65.          Height          =   330
  66.          Index           =   10
  67.          Left            =   4110
  68.          Picture         =   MAINMDI2.FRX:0182
  69.          ScaleHeight     =   330
  70.          ScaleWidth      =   360
  71.          TabIndex        =   13
  72.          Top             =   60
  73.          Width           =   360
  74.       End
  75.       Begin PictureBox Picture1 
  76.          AutoSize        =   -1  'True
  77.          BorderStyle     =   0  'None
  78.          Height          =   330
  79.          Index           =   9
  80.          Left            =   3750
  81.          Picture         =   MAINMDI2.FRX:0304
  82.          ScaleHeight     =   330
  83.          ScaleWidth      =   360
  84.          TabIndex        =   12
  85.          Top             =   60
  86.          Width           =   360
  87.       End
  88.       Begin PictureBox Picture1 
  89.          AutoSize        =   -1  'True
  90.          BorderStyle     =   0  'None
  91.          Height          =   330
  92.          Index           =   8
  93.          Left            =   3300
  94.          Picture         =   MAINMDI2.FRX:0486
  95.          ScaleHeight     =   330
  96.          ScaleWidth      =   360
  97.          TabIndex        =   11
  98.          Top             =   60
  99.          Width           =   360
  100.       End
  101.       Begin PictureBox Picture1 
  102.          AutoSize        =   -1  'True
  103.          BorderStyle     =   0  'None
  104.          Height          =   330
  105.          Index           =   7
  106.          Left            =   2850
  107.          Picture         =   MAINMDI2.FRX:0608
  108.          ScaleHeight     =   330
  109.          ScaleWidth      =   360
  110.          TabIndex        =   10
  111.          Top             =   60
  112.          Width           =   360
  113.       End
  114.       Begin PictureBox Picture1 
  115.          AutoSize        =   -1  'True
  116.          BorderStyle     =   0  'None
  117.          Height          =   330
  118.          Index           =   6
  119.          Left            =   2490
  120.          Picture         =   MAINMDI2.FRX:078A
  121.          ScaleHeight     =   330
  122.          ScaleWidth      =   360
  123.          TabIndex        =   9
  124.          Top             =   60
  125.          Width           =   360
  126.       End
  127.       Begin PictureBox Picture1 
  128.          AutoSize        =   -1  'True
  129.          BorderStyle     =   0  'None
  130.          Height          =   330
  131.          Index           =   5
  132.          Left            =   2130
  133.          Picture         =   MAINMDI2.FRX:090C
  134.          ScaleHeight     =   330
  135.          ScaleWidth      =   360
  136.          TabIndex        =   8
  137.          Top             =   60
  138.          Width           =   360
  139.       End
  140.       Begin PictureBox Picture1 
  141.          AutoSize        =   -1  'True
  142.          BorderStyle     =   0  'None
  143.          Height          =   330
  144.          Index           =   4
  145.          Left            =   1680
  146.          Picture         =   MAINMDI2.FRX:0A8E
  147.          ScaleHeight     =   330
  148.          ScaleWidth      =   360
  149.          TabIndex        =   7
  150.          Top             =   60
  151.          Width           =   360
  152.       End
  153.       Begin PictureBox Picture1 
  154.          AutoSize        =   -1  'True
  155.          BorderStyle     =   0  'None
  156.          Height          =   330
  157.          Index           =   3
  158.          Left            =   1320
  159.          Picture         =   MAINMDI2.FRX:0C10
  160.          ScaleHeight     =   330
  161.          ScaleWidth      =   360
  162.          TabIndex        =   6
  163.          Top             =   60
  164.          Width           =   360
  165.       End
  166.       Begin PictureBox Picture1 
  167.          AutoSize        =   -1  'True
  168.          BorderStyle     =   0  'None
  169.          Height          =   330
  170.          Index           =   2
  171.          Left            =   870
  172.          Picture         =   MAINMDI2.FRX:0D92
  173.          ScaleHeight     =   330
  174.          ScaleWidth      =   360
  175.          TabIndex        =   5
  176.          Top             =   60
  177.          Width           =   360
  178.       End
  179.       Begin PictureBox Picture1 
  180.          AutoSize        =   -1  'True
  181.          BorderStyle     =   0  'None
  182.          Height          =   330
  183.          Index           =   1
  184.          Left            =   510
  185.          Picture         =   MAINMDI2.FRX:0F14
  186.          ScaleHeight     =   330
  187.          ScaleWidth      =   360
  188.          TabIndex        =   4
  189.          Top             =   60
  190.          Width           =   360
  191.       End
  192.       Begin PictureBox Picture1 
  193.          AutoSize        =   -1  'True
  194.          BorderStyle     =   0  'None
  195.          Height          =   330
  196.          Index           =   0
  197.          Left            =   150
  198.          Picture         =   MAINMDI2.FRX:1096
  199.          ScaleHeight     =   330
  200.          ScaleWidth      =   360
  201.          TabIndex        =   3
  202.          Top             =   60
  203.          Width           =   360
  204.       End
  205.       Begin Timer Timer1 
  206.          Enabled         =   0   'False
  207.          Interval        =   500
  208.          Left            =   4860
  209.          Top             =   0
  210.       End
  211.       Begin ccSbcEasy SbcEasy1 
  212.          ForceActive     =   0   'False
  213.          ForceCtlBox     =   0   'False
  214.          Left            =   4380
  215.          MouseTransit    =   1  'Track windows only
  216.          MouseTransitNC  =   1  'NC not a window
  217.          Top             =   -30
  218.       End
  219.    End
  220.    Begin Menu filemenu 
  221.       Caption         =   "&File"
  222.       Begin Menu filenewmenu 
  223.          Caption         =   "&New"
  224.       End
  225.       Begin Menu fileexitmenu 
  226.          Caption         =   "E&xit"
  227.       End
  228.    End
  229. Option Explicit
  230. Sub fileexitmenu_Click ()
  231. Unload Me
  232. End Sub
  233. Sub LoadTagProperties ()
  234. 'The tag property strings are kept in a separate module
  235. 'so you can easily switch between languages. The ideal way
  236. 'to do this is to use another file which contains the
  237. 'strings for all the different languages this product
  238. 'supports and load the appropriate strings based on the
  239. 'language settings in their win.ini file.
  240.     Picture1(0).Tag = TOOLTIP_FILENEW
  241.     Picture1(1).Tag = TOOLTIP_OPEN
  242.     Picture1(2).Tag = TOOLTIP_SAVE
  243.     Picture1(3).Tag = TOOLTIP_LINE
  244.     Picture1(4).Tag = TOOLTIP_ARC
  245.     Picture1(5).Tag = TOOLTIP_BOLD
  246.     Picture1(6).Tag = TOOLTIP_ITALIC
  247.     Picture1(7).Tag = TOOLTIP_UNDERLINE
  248.     Picture1(8).Tag = TOOLTIP_MACRO
  249.     Picture1(9).Tag = TOOLTIP_CAPTURE
  250.     Picture1(10).Tag = TOOLTIP_REPORT
  251.     Picture1(11).Tag = TOOLTIP_CUT
  252. End Sub
  253. Sub MDIForm_Load ()
  254.     'show a mdi child form just for fun
  255.     MDIChild.Show
  256.     'load tag properties of controls with tooltips and status help
  257.     LoadTagProperties
  258. End Sub
  259. Sub MDIForm_Unload (Cancel As Integer)
  260.     'unload the tooltip form when this is being unloaded
  261.     Unload ToolTipForm
  262. End Sub
  263. Sub SbcEasy1_MouseEnter (FormDesc As String, ControlDesc As String)
  264. Dim hactive%
  265.     'if this is not the active app, do not try to display the tooltip,
  266.     'you will still get mouse enter and mouse exits when another
  267.     'app is active
  268.     hactive% = GetActiveWindow()
  269.     'hactive is the topmost level window for the active app
  270.     If (hactive% = 0) Or (hactive% <> Me.hWnd) Then Exit Sub
  271.     'update the statusbar with current status if any
  272.     UpdateStatusBar SbcEasy1.TransitHctl, StatusLab
  273.     'start the timer if it is over one of our "tooltips" controls,
  274.     'it will pop up the tooltips form
  275.     Timer1.Enabled = True
  276. End Sub
  277. Sub SbcEasy1_MouseExit (FormDesc As String, ControlDesc As String)
  278.     'clear status bar, stop the timer, and hide the tooltip form
  279.     UpdateStatusBar 0, StatusLab
  280.     Timer1.Enabled = False
  281.     ShowToolTip 0
  282. End Sub
  283. Sub Timer1_Timer ()
  284.     'if the mouse stayed in this control for the
  285.     'specified interval, then bring up the tooltip
  286.     'form if there is a tooltip to display for this control
  287.     Timer1.Enabled = False
  288.     ShowToolTip SbcEasy1.TransitHctl
  289. End Sub
  290.