home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 Special / chip-cd_2001_spec_05.zip / spec_05 / apps / crystal / disk18 / Xvb372._ / Xvb372.
Text File  |  1999-08-23  |  20KB  |  677 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "comdlg32.ocx"
  3. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.1#0"; "comctl32.ocx"
  4. Begin VB.Form frmMain 
  5.    Caption         =   "XtremeDemo"
  6.    ClientHeight    =   6180
  7.    ClientLeft      =   156
  8.    ClientTop       =   708
  9.    ClientWidth     =   8952
  10.    Icon            =   "Main.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   6180
  13.    ScaleWidth      =   8952
  14.    Begin VB.PictureBox picNavBar 
  15.       Align           =   1  'Align Top
  16.       Height          =   360
  17.       Left            =   0
  18.       ScaleHeight     =   312
  19.       ScaleWidth      =   8904
  20.       TabIndex        =   1
  21.       Top             =   0
  22.       Width           =   8955
  23.       Begin VB.Image imgHome 
  24.          Height          =   240
  25.          Left            =   0
  26.          Picture         =   "Main.frx":030A
  27.          Top             =   0
  28.          Width           =   1176
  29.       End
  30.       Begin VB.Image imgWarehouse 
  31.          Height          =   240
  32.          Left            =   6240
  33.          Picture         =   "Main.frx":081A
  34.          Top             =   0
  35.          Width           =   1152
  36.       End
  37.       Begin VB.Image imgSales 
  38.          Height          =   240
  39.          Left            =   4788
  40.          Picture         =   "Main.frx":0E15
  41.          Top             =   0
  42.          Width           =   1164
  43.       End
  44.       Begin VB.Image imgManagement 
  45.          Height          =   240
  46.          Left            =   2940
  47.          Picture         =   "Main.frx":144E
  48.          Top             =   0
  49.          Width           =   1476
  50.       End
  51.       Begin VB.Image imgCompany 
  52.          Height          =   240
  53.          Left            =   1476
  54.          Picture         =   "Main.frx":1B92
  55.          Top             =   0
  56.          Width           =   1176
  57.       End
  58.    End
  59.    Begin ComctlLib.StatusBar sbStatusBar 
  60.       Align           =   2  'Align Bottom
  61.       Height          =   276
  62.       Left            =   0
  63.       TabIndex        =   0
  64.       Top             =   5904
  65.       Width           =   8952
  66.       _ExtentX        =   15790
  67.       _ExtentY        =   487
  68.       SimpleText      =   ""
  69.       _Version        =   327680
  70.       BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7} 
  71.          NumPanels       =   3
  72.          BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
  73.             AutoSize        =   1
  74.             Object.Width           =   10266
  75.             Text            =   "Status"
  76.             TextSave        =   "Status"
  77.             Object.Tag             =   ""
  78.          EndProperty
  79.          BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
  80.             Style           =   6
  81.             AutoSize        =   2
  82.             TextSave        =   "8/1/97"
  83.             Object.Tag             =   ""
  84.          EndProperty
  85.          BeginProperty Panel3 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
  86.             Style           =   5
  87.             AutoSize        =   2
  88.             TextSave        =   "12:21 PM"
  89.             Object.Tag             =   ""
  90.          EndProperty
  91.       EndProperty
  92.    End
  93.    Begin MSComDlg.CommonDialog dlgCommonDialog 
  94.       Left            =   285
  95.       Top             =   585
  96.       _ExtentX        =   847
  97.       _ExtentY        =   847
  98.       _Version        =   327680
  99.    End
  100.    Begin VB.Image imgLauncher 
  101.       Height          =   585
  102.       Index           =   0
  103.       Left            =   1140
  104.       MouseIcon       =   "Main.frx":21FF
  105.       Top             =   1485
  106.       Visible         =   0   'False
  107.       Width           =   1095
  108.    End
  109.    Begin VB.Menu mnuFile 
  110.       Caption         =   "&File"
  111.       Begin VB.Menu mnuFileLogin 
  112.          Caption         =   "&Login"
  113.       End
  114.       Begin VB.Menu mnuFileClose 
  115.          Caption         =   "&Close Preview Window"
  116.          Enabled         =   0   'False
  117.       End
  118.       Begin VB.Menu mnuFileBar1 
  119.          Caption         =   "-"
  120.       End
  121.       Begin VB.Menu mnuFilePageSetup 
  122.          Caption         =   "Page Set&up..."
  123.       End
  124.       Begin VB.Menu mnuFileBar2 
  125.          Caption         =   "-"
  126.       End
  127.       Begin VB.Menu mnuFileExit 
  128.          Caption         =   "E&xit"
  129.       End
  130.    End
  131.    Begin VB.Menu mnuView 
  132.       Caption         =   "&View"
  133.       Begin VB.Menu mnuViewReport 
  134.          Caption         =   "&Report"
  135.          Begin VB.Menu mnuViewReportCompany 
  136.             Caption         =   "&Company Info"
  137.             Begin VB.Menu mnuViewReportCompanyEmployee 
  138.                Caption         =   "&Employee Profile"
  139.             End
  140.             Begin VB.Menu mnuViewReportCompanyMission 
  141.                Caption         =   "&Mission"
  142.             End
  143.             Begin VB.Menu mnuViewReportCompanyHistory 
  144.                Caption         =   "&Corporate History"
  145.             End
  146.             Begin VB.Menu mnuViewReportCompanyPartners 
  147.                Caption         =   "&Founding Partners"
  148.             End
  149.          End
  150.          Begin VB.Menu mnuViewReportManagement 
  151.             Caption         =   "&Management Reports"
  152.             Begin VB.Menu mnuViewReportManagementWorldwide 
  153.                Caption         =   "&Worldwide Sales"
  154.             End
  155.             Begin VB.Menu mnuViewReportManagementConsolidated 
  156.                Caption         =   "&Consolidated Balance Sheet"
  157.             End
  158.             Begin VB.Menu mnuViewReportManagementFinSum 
  159.                Caption         =   "Financial &Summary"
  160.             End
  161.             Begin VB.Menu mnuViewReportManagementFinRat 
  162.                Caption         =   "Financial &Ratios"
  163.             End
  164.             Begin VB.Menu mnuViewReportManagementIncome 
  165.                Caption         =   "&Income Statement"
  166.             End
  167.          End
  168.          Begin VB.Menu mnuViewReportSales 
  169.             Caption         =   "&Sales Tools"
  170.             Begin VB.Menu mnuViewReportSalesCustomer 
  171.                Caption         =   "&Customer Profile && Order History"
  172.             End
  173.             Begin VB.Menu mnuViewReportSalesSales 
  174.                Caption         =   "&Sales by Sales Rep"
  175.             End
  176.             Begin VB.Menu mnuViewReportSalesInventory 
  177.                Caption         =   "&Inventory Report"
  178.                Index           =   0
  179.             End
  180.             Begin VB.Menu mnuViewReportSalesOrder 
  181.                Caption         =   "&Order Form"
  182.             End
  183.             Begin VB.Menu mnuViewReportSalesProduct 
  184.                Caption         =   "&Product Catalog"
  185.             End
  186.          End
  187.          Begin VB.Menu mnuViewReportWarehouse 
  188.             Caption         =   "&Warehouse"
  189.             Begin VB.Menu mnuViewReportWarehouseInventory 
  190.                Caption         =   "&Inventory Report"
  191.             End
  192.             Begin VB.Menu mnuViewReportWarehouseShipping 
  193.                Caption         =   "&Shipping Labels"
  194.             End
  195.             Begin VB.Menu mnuViewReportWarehouseOrder 
  196.                Caption         =   "&Order Packing List"
  197.             End
  198.          End
  199.       End
  200.       Begin VB.Menu mnuViewData 
  201.          Caption         =   "&Data Form"
  202.          Begin VB.Menu mnuViewDataCustomer 
  203.             Caption         =   "&Customer"
  204.          End
  205.          Begin VB.Menu mnuViewDataEmployee 
  206.             Caption         =   "&Employee"
  207.          End
  208.          Begin VB.Menu mnuViewDataEmployeeAddresses 
  209.             Caption         =   "Employee &Addresses"
  210.          End
  211.          Begin VB.Menu mnuViewDataFinancials 
  212.             Caption         =   "&Financials"
  213.          End
  214.          Begin VB.Menu mnuViewDataOrders 
  215.             Caption         =   "&Orders"
  216.          End
  217.          Begin VB.Menu mnuViewDataOrdersDetail 
  218.             Caption         =   "Orders &Detail"
  219.          End
  220.          Begin VB.Menu mnuViewDataProduct 
  221.             Caption         =   "&Product"
  222.          End
  223.          Begin VB.Menu mnuViewDataProductType 
  224.             Caption         =   "Product &Type"
  225.          End
  226.          Begin VB.Menu mnuViewDataPurchases 
  227.             Caption         =   "P&urchases"
  228.          End
  229.       End
  230.       Begin VB.Menu mnuViewBar1 
  231.          Caption         =   "-"
  232.       End
  233.       Begin VB.Menu mnuViewNavigation 
  234.          Caption         =   "&Navigation Bar"
  235.          Checked         =   -1  'True
  236.       End
  237.       Begin VB.Menu mnuViewStatusBar 
  238.          Caption         =   "&Status Bar"
  239.          Checked         =   -1  'True
  240.       End
  241.    End
  242.    Begin VB.Menu mnuHelp 
  243.       Caption         =   "&Help"
  244.       Begin VB.Menu mnuHelpContents 
  245.          Caption         =   "&Contents"
  246.       End
  247.       Begin VB.Menu mnuHelpSearch 
  248.          Caption         =   "&Search For Help On..."
  249.       End
  250.       Begin VB.Menu mnuHelpBar1 
  251.          Caption         =   "-"
  252.       End
  253.       Begin VB.Menu mnuHelpAbout 
  254.          Caption         =   "&About XtremeDemo..."
  255.       End
  256.    End
  257. End
  258. Attribute VB_Name = "frmMain"
  259. Attribute VB_GlobalNameSpace = False
  260. Attribute VB_Creatable = False
  261. Attribute VB_PredeclaredId = True
  262. Attribute VB_Exposed = False
  263. Option Explicit
  264.  
  265. Private Declare Function OSWinHelp% Lib "user32" Alias "WinHelpA" (ByVal hwnd&, ByVal HelpFile$, ByVal wCommand%, dwData As Any)
  266. Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wcmd As Long) As Long
  267. Private Declare Function MoveWindow Lib "user32" (ByVal hwnd As Long, ByVal x As Long, ByVal Y As Long, ByVal w As Long, ByVal h As Long, ByVal repaint As Long) As Long
  268.  
  269. Public gsDatabase As String
  270. Public gsConnect As String
  271. Public gsRecordsource As String
  272.  
  273. Public XtremeDemo As New clsXtremeDemo
  274.  
  275. Private m_colReportNames As New Collection
  276.  
  277. Private Function SetNavTab(ctlNew As Control) As Boolean
  278.   Static ctlOld As Control
  279.   SetNavTab = True
  280.   If Not ctlOld Is Nothing Then
  281.     If ctlOld = ctlNew Then
  282.       SetNavTab = False
  283.     Else
  284.       ctlNew.Picture = LoadPicture(App.Path & "\images\dn_" & Mid$(ctlNew.Name, 4) & ".gif")
  285.       ctlOld.Picture = LoadPicture(App.Path & "\images\up_" & Mid$(ctlOld.Name, 4) & ".gif")
  286.       HideLaunchers
  287.       Me.Picture = LoadPicture(App.Path & "\images\bg_" & Mid$(ctlNew.Name, 4) & ".gif")
  288.     End If
  289.   Else
  290.     ctlNew.Picture = LoadPicture(App.Path & "\images\dn_" & Mid$(ctlNew.Name, 4) & ".gif")
  291.     HideLaunchers
  292.     Me.Picture = LoadPicture(App.Path & "\images\bg_" & Mid$(ctlNew.Name, 4) & ".gif")
  293.   End If
  294.   Set ctlOld = ctlNew
  295. End Function
  296.  
  297. Private Sub ResetLaunchers()
  298.   Dim intLauncherIndex As Integer
  299.   For intLauncherIndex = 1 To imgLauncher.UBound
  300.     Unload imgLauncher(intLauncherIndex)
  301.     m_colReportNames.Remove 1
  302.   Next intLauncherIndex
  303. End Sub
  304.  
  305. Private Sub HideLaunchers()
  306.   Dim intLauncherIndex As Integer
  307.   For intLauncherIndex = 1 To imgLauncher.UBound
  308.     imgLauncher(intLauncherIndex).Visible = False
  309.   Next intLauncherIndex
  310. End Sub
  311.  
  312. Private Sub ShowLaunchers()
  313.   Dim intLauncherIndex As Integer
  314.   For intLauncherIndex = 1 To imgLauncher.UBound
  315.     imgLauncher(intLauncherIndex).Visible = True
  316.   Next intLauncherIndex
  317. End Sub
  318.  
  319. Private Sub AddLauncher(strReportName As String, Optional strImageFilename As String)
  320.   Dim intLauncherIndex As Integer
  321.   intLauncherIndex = imgLauncher.UBound + 1
  322.   Load imgLauncher(intLauncherIndex)
  323.   With imgLauncher(intLauncherIndex)
  324.     .Left = 0
  325.     If intLauncherIndex = 1 Then
  326.       If picNavBar.Visible Then
  327.         .Top = picNavBar.Height
  328.       Else
  329.         .Top = 0
  330.       End If
  331.     Else
  332.       .Top = imgLauncher(intLauncherIndex - 1).Top + imgLauncher(intLauncherIndex - 1).Height
  333.     End If
  334.     If strImageFilename = Empty Then
  335.       .Picture = LoadPicture(App.Path & "\images\rp_" & strReportName & ".gif")
  336.     Else
  337.       .Picture = LoadPicture(App.Path & "\images\" & strImageFilename)
  338.     End If
  339.     .Visible = True
  340.   End With
  341.   m_colReportNames.Add strReportName
  342. End Sub
  343.  
  344. Private Sub Form_Load()
  345.   Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 500)
  346.   Me.Top = GetSetting(App.Title, "Settings", "MainTop", 500)
  347.   Me.Width = GetSetting(App.Title, "Settings", "MainWidth", Screen.Width - 500)
  348.   Me.Height = GetSetting(App.Title, "Settings", "MainHeight", Screen.Height - 500)
  349.   
  350.   frmSplash.Show vbModeless, Me
  351.   frmSplash.Refresh
  352.   
  353.   Me.Show
  354.   imgHome_Click
  355.   
  356.   Unload frmSplash
  357.   
  358.   gsDatabase = Mid(App.Path, 1, (Len(App.Path) - 23)) & "\XTREME.MDB"
  359.   gsConnect = ""
  360.   ChDir (App.Path)
  361. End Sub
  362.  
  363. Private Sub Form_Resize()
  364.   If Me.Width > Me.Image.Width Then Me.Width = Me.Image.Width
  365.   If Me.Height > Me.Image.Height Then Me.Height = Me.Image.Height
  366.   If IsObject(XtremeDemo.m_crwWindow) Then
  367.     If Me.mnuFileClose.Enabled Then
  368.       MoveWindow XtremeDemo.m_crwWindow.WindowHandle, 0, 0, Me.ScaleWidth, Me.ScaleHeight, 1
  369.     End If
  370.   End If
  371.   
  372. End Sub
  373.  
  374. Private Sub Form_Unload(Cancel As Integer)
  375.   Dim i As Integer
  376.  
  377.   'close all sub forms
  378.   For i = Forms.Count - 1 To 1 Step -1
  379.     Unload Forms(i)
  380.   Next
  381.   If Me.WindowState <> vbMinimized Then
  382.      SaveSetting App.Title, "Settings", "MainLeft", Me.Left
  383.      SaveSetting App.Title, "Settings", "MainTop", Me.Top
  384.      SaveSetting App.Title, "Settings", "MainWidth", Me.Width
  385.      SaveSetting App.Title, "Settings", "MainHeight", Me.Height
  386.   End If
  387. End Sub
  388.  
  389. Private Sub imgCompany_Click()
  390.     If Me.mnuFileClose.Enabled Then
  391.         XtremeDemo.CloseWindow
  392.     End If
  393.  
  394.   If SetNavTab(imgCompany) Then
  395.     ResetLaunchers
  396.     AddLauncher "empprof"
  397.     ShowLaunchers
  398.   End If
  399. End Sub
  400.  
  401. Private Sub imgHome_Click()
  402.     If Me.mnuFileClose.Enabled Then
  403.         XtremeDemo.CloseWindow
  404.     End If
  405.  
  406.   If SetNavTab(imgHome) Then
  407.     ResetLaunchers
  408.   End If
  409. End Sub
  410.  
  411. Private Sub imgLauncher_Click(Index As Integer)
  412.   XtremeDemo.LaunchReport m_colReportNames(Index)
  413. End Sub
  414.  
  415. Private Sub imgManagement_Click()
  416.   If Me.mnuFileClose.Enabled Then
  417.     XtremeDemo.CloseWindow
  418.   End If
  419.  
  420.   If SetNavTab(imgManagement) Then
  421.     ResetLaunchers
  422.     AddLauncher "wwsales"
  423.     AddLauncher "balance"
  424.     AddLauncher "finstate"
  425.     AddLauncher "income"
  426.     ShowLaunchers
  427.   End If
  428. End Sub
  429.  
  430. Private Sub imgSales_Click()
  431.   If Me.mnuFileClose.Enabled Then
  432.     XtremeDemo.CloseWindow
  433.   End If
  434.  
  435.   If SetNavTab(imgSales) Then
  436.     ResetLaunchers
  437.     AddLauncher "customer"
  438.     AddLauncher "empsales"
  439.     AddLauncher "invent", "rp_invent_s.gif"
  440.     AddLauncher "statemnt"
  441.     AddLauncher "prodcat"
  442.     ShowLaunchers
  443.   End If
  444. End Sub
  445.  
  446. Private Sub imgWarehouse_Click()
  447.   If Me.mnuFileClose.Enabled Then
  448.     XtremeDemo.CloseWindow
  449.   End If
  450.   
  451.   If SetNavTab(imgWarehouse) Then
  452.     ResetLaunchers
  453.     AddLauncher "invent", "rp_invent_w.gif"
  454.     AddLauncher "maillabl"
  455.     AddLauncher "ordpack"
  456.     ShowLaunchers
  457.   End If
  458. End Sub
  459.  
  460. Private Sub mnuFileClose_Click()
  461.   XtremeDemo.CloseWindow
  462. End Sub
  463.  
  464. Private Sub mnuViewDataPurchases_Click()
  465.     Dim f As New frmPurchases
  466.     f.Show vbModeless, Me
  467. End Sub
  468.  
  469. Private Sub mnuViewDataProductType_Click()
  470.   Dim f As New frmProductType
  471.   f.Show vbModeless, Me
  472. End Sub
  473.  
  474. Private Sub mnuViewDataProduct_Click()
  475.   Dim f As New frmProduct
  476.   f.Show vbModeless, Me
  477. End Sub
  478.  
  479. Private Sub mnuViewDataOrdersDetail_Click()
  480.   Dim f As New frmOrdersDetail
  481.   f.Show vbModeless, Me
  482. End Sub
  483.  
  484. Private Sub mnuViewDataOrders_Click()
  485.   Dim f As New frmOrders
  486.   f.Show vbModeless, Me
  487. End Sub
  488.  
  489. Private Sub mnuViewDataFinancials_Click()
  490.   Dim f As New frmFinancials
  491.   f.Show vbModeless, Me
  492. End Sub
  493.  
  494. Private Sub mnuViewDataEmployeeAddresses_Click()
  495.   Dim f As New frmEmployeeAddresses
  496.   f.Show vbModeless, Me
  497. End Sub
  498.  
  499. Private Sub mnuViewDataEmployee_Click()
  500.   Dim f As New frmEmployee
  501.   f.Show vbModeless, Me
  502. End Sub
  503.  
  504. Private Sub mnuViewDataCustomer_Click()
  505.   Dim f As New frmCustomer
  506.   f.Show vbModeless, Me
  507. End Sub
  508.  
  509. Private Sub mnuHelpAbout_Click()
  510.   frmAbout.Show vbModal, Me
  511. End Sub
  512.  
  513. Private Sub mnuViewNavigation_Click()
  514.   If mnuViewNavigation.Checked Then
  515.     picNavBar.Visible = False
  516.     mnuViewNavigation.Checked = False
  517.   Else
  518.     picNavBar.Visible = True
  519.     mnuViewNavigation.Checked = True
  520.   End If
  521. End Sub
  522.  
  523. Private Sub mnuViewReportCompanyEmployee_Click()
  524.   imgCompany_Click
  525.   Me.Refresh
  526.   imgLauncher_Click (1)
  527. End Sub
  528.  
  529. Private Sub mnuViewReportCompanyHistory_Click()
  530.   imgCompany_Click
  531.   Me.Refresh
  532.   imgLauncher_Click (3)
  533. End Sub
  534.  
  535. Private Sub mnuViewReportCompanyMission_Click()
  536.   imgCompany_Click
  537.   Me.Refresh
  538.   imgLauncher_Click (2)
  539. End Sub
  540.  
  541. Private Sub mnuViewReportCompanyPartners_Click()
  542.   imgCompany_Click
  543.   Me.Refresh
  544.   imgLauncher_Click (4)
  545. End Sub
  546.  
  547. Private Sub mnuViewReportManagementConsolidated_Click()
  548.   imgManagement_Click
  549.   Me.Refresh
  550.   imgLauncher_Click (2)
  551. End Sub
  552.  
  553. Private Sub mnuViewReportManagementFinRat_Click()
  554.   imgManagement_Click
  555.   Me.Refresh
  556.   imgLauncher_Click (4)
  557. End Sub
  558.  
  559. Private Sub mnuViewReportManagementFinSum_Click()
  560.   imgManagement_Click
  561.   Me.Refresh
  562.   imgLauncher_Click (3)
  563. End Sub
  564.  
  565. Private Sub mnuViewReportManagementIncome_Click()
  566.   imgManagement_Click
  567.   Me.Refresh
  568.   imgLauncher_Click (5)
  569. End Sub
  570.  
  571. Private Sub mnuViewReportManagementWorldwide_Click()
  572.   imgManagement_Click
  573.   Me.Refresh
  574.   imgLauncher_Click (1)
  575. End Sub
  576.  
  577. Private Sub mnuViewReportSalesCustomer_Click()
  578.   imgSales_Click
  579.   Me.Refresh
  580.   imgLauncher_Click (1)
  581. End Sub
  582.  
  583. Private Sub mnuViewReportSalesInventory_Click(Index As Integer)
  584.   imgSales_Click
  585.   Me.Refresh
  586.   imgLauncher_Click (3)
  587. End Sub
  588.  
  589. Private Sub mnuViewReportSalesOrder_Click()
  590.   imgSales_Click
  591.   Me.Refresh
  592.   imgLauncher_Click (4)
  593. End Sub
  594.  
  595. Private Sub mnuViewReportSalesProduct_Click()
  596.   imgSales_Click
  597.   Me.Refresh
  598.   imgLauncher_Click (5)
  599. End Sub
  600.  
  601. Private Sub mnuViewReportSalesSales_Click()
  602.   imgSales_Click
  603.   Me.Refresh
  604.   imgLauncher_Click (2)
  605. End Sub
  606.  
  607. Private Sub mnuViewReportWarehouseInventory_Click()
  608.   imgWarehouse_Click
  609.   Me.Refresh
  610.   imgLauncher_Click (1)
  611. End Sub
  612.  
  613. Private Sub mnuViewReportWarehouseOrder_Click()
  614.   imgWarehouse_Click
  615.   Me.Refresh
  616.   imgLauncher_Click (3)
  617. End Sub
  618.  
  619. Private Sub mnuViewReportWarehouseShipping_Click()
  620.   imgWarehouse_Click
  621.   Me.Refresh
  622.   imgLauncher_Click (2)
  623. End Sub
  624.  
  625. Private Sub mnuViewStatusBar_Click()
  626.   If mnuViewStatusBar.Checked Then
  627.     sbStatusBar.Visible = False
  628.     mnuViewStatusBar.Checked = False
  629.   Else
  630.     sbStatusBar.Visible = True
  631.     mnuViewStatusBar.Checked = True
  632.   End If
  633. End Sub
  634.  
  635. Private Sub mnuHelpContents_Click()
  636.   Dim nRet As Integer
  637.  
  638.   'if there is no helpfile for this project display a message to the user
  639.   'you can set the HelpFile for your application in the
  640.   'Project Properties dialog
  641.   If Len(App.HelpFile) = 0 Then
  642.     MsgBox "Unable to display Help Contents. There is no Help associated with this project.", vbInformation, Me.Caption
  643.   Else
  644.     On Error Resume Next
  645.     nRet = OSWinHelp(Me.hwnd, App.HelpFile, 3, 0)
  646.     If Err Then
  647.       MsgBox Err.Description
  648.     End If
  649.   End If
  650. End Sub
  651.  
  652. Private Sub mnuHelpSearch_Click()
  653.   Dim nRet As Integer
  654.  
  655.   'if there is no helpfile for this project display a message to the user
  656.   'you can set the HelpFile for your application in the
  657.   'Project Properties dialog
  658.   If Len(App.HelpFile) = 0 Then
  659.     MsgBox "Unable to display Help Contents. There is no Help associated with this project.", vbInformation, Me.Caption
  660.   Else
  661.     On Error Resume Next
  662.     nRet = OSWinHelp(Me.hwnd, App.HelpFile, 261, 0)
  663.     If Err Then
  664.       MsgBox Err.Description
  665.     End If
  666.   End If
  667. End Sub
  668.  
  669. Private Sub mnuFilePageSetup_Click()
  670.   dlgCommonDialog.ShowPrinter
  671. End Sub
  672.  
  673. Private Sub mnuFileExit_Click()
  674.   'unload the form
  675.   Unload Me
  676. End Sub
  677.