home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2003 February / PCWFEB03.iso / software / dantzretrospect / English / Installer / Data.Cab / F4270_html.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-07-03  |  14.8 KB  |  460 lines

  1. VERSION 5.00
  2. Begin VB.Form frmHTML 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "ReportsWatcher - HTML Editor"
  5.    ClientHeight    =   5835
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   5430
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   5835
  13.    ScaleWidth      =   5430
  14.    ShowInTaskbar   =   0   'False
  15.    StartUpPosition =   3  'Windows Default
  16.    Begin VB.Frame frmNvrFoot 
  17.       Caption         =   "Footer"
  18.       Height          =   1695
  19.       Left            =   120
  20.       TabIndex        =   28
  21.       Top             =   3420
  22.       Width           =   5175
  23.       Begin VB.TextBox txtNvrFoot 
  24.          Height          =   1335
  25.          Left            =   120
  26.          MultiLine       =   -1  'True
  27.          ScrollBars      =   2  'Vertical
  28.          TabIndex        =   29
  29.          Tag             =   "</body></html>"
  30.          Text            =   "html.frx":0000
  31.          Top             =   240
  32.          Width           =   4935
  33.       End
  34.    End
  35.    Begin VB.Frame frmNvrHead 
  36.       Caption         =   "Header"
  37.       Height          =   2415
  38.       Left            =   120
  39.       TabIndex        =   26
  40.       Top             =   780
  41.       Width           =   5175
  42.       Begin VB.TextBox txtNvrHead 
  43.          Height          =   2085
  44.          Left            =   120
  45.          MultiLine       =   -1  'True
  46.          ScrollBars      =   2  'Vertical
  47.          TabIndex        =   27
  48.          Tag             =   $"html.frx":0011
  49.          Top             =   240
  50.          Width           =   4935
  51.       End
  52.    End
  53.    Begin VB.CommandButton cmdNvrUseDefault 
  54.       Caption         =   "&Use Default"
  55.       Height          =   375
  56.       Left            =   3720
  57.       TabIndex        =   25
  58.       Top             =   180
  59.       Width           =   1575
  60.    End
  61.    Begin VB.CommandButton OKButton 
  62.       Caption         =   "&OK"
  63.       Height          =   375
  64.       Left            =   1560
  65.       TabIndex        =   9
  66.       Top             =   5280
  67.       Width           =   1215
  68.    End
  69.    Begin VB.CommandButton CancelButton 
  70.       Cancel          =   -1  'True
  71.       Caption         =   "Cancel"
  72.       Height          =   375
  73.       Left            =   2880
  74.       TabIndex        =   10
  75.       Top             =   5280
  76.       Width           =   1215
  77.    End
  78.    Begin VB.CommandButton cmdApply 
  79.       Caption         =   "&Apply"
  80.       Height          =   375
  81.       Left            =   4200
  82.       TabIndex        =   11
  83.       Top             =   5280
  84.       Width           =   1095
  85.    End
  86.    Begin VB.Frame frmSumHead 
  87.       Caption         =   "Header"
  88.       Height          =   2415
  89.       Left            =   120
  90.       TabIndex        =   24
  91.       Top             =   780
  92.       Width           =   5175
  93.       Begin VB.TextBox txtSumHead 
  94.          Height          =   2085
  95.          Left            =   120
  96.          MultiLine       =   -1  'True
  97.          ScrollBars      =   2  'Vertical
  98.          TabIndex        =   1
  99.          Tag             =   $"html.frx":0267
  100.          Top             =   240
  101.          Width           =   4935
  102.       End
  103.    End
  104.    Begin VB.Frame frmSumFoot 
  105.       Caption         =   "Footer"
  106.       Height          =   1695
  107.       Left            =   120
  108.       TabIndex        =   23
  109.       Top             =   3420
  110.       Width           =   5175
  111.       Begin VB.TextBox txtSumFoot 
  112.          Height          =   1335
  113.          Left            =   120
  114.          MultiLine       =   -1  'True
  115.          ScrollBars      =   2  'Vertical
  116.          TabIndex        =   5
  117.          Tag             =   "</body></html>"
  118.          Text            =   "html.frx":04E2
  119.          Top             =   240
  120.          Width           =   4935
  121.       End
  122.    End
  123.    Begin VB.CommandButton cmdSumUseDefault 
  124.       Caption         =   "&Use Default"
  125.       Height          =   375
  126.       Left            =   3720
  127.       TabIndex        =   22
  128.       Top             =   180
  129.       Width           =   1575
  130.    End
  131.    Begin VB.Frame frmRepHead 
  132.       Caption         =   "Header"
  133.       Height          =   2415
  134.       Left            =   120
  135.       TabIndex        =   21
  136.       Top             =   780
  137.       Width           =   5175
  138.       Begin VB.TextBox txtRepHead 
  139.          Height          =   2085
  140.          Left            =   120
  141.          MultiLine       =   -1  'True
  142.          ScrollBars      =   2  'Vertical
  143.          TabIndex        =   3
  144.          Tag             =   $"html.frx":04F3
  145.          Top             =   240
  146.          Width           =   4935
  147.       End
  148.    End
  149.    Begin VB.Frame frmRepFoot 
  150.       Caption         =   "Footer"
  151.       Height          =   1695
  152.       Left            =   120
  153.       TabIndex        =   20
  154.       Top             =   3420
  155.       Width           =   5175
  156.       Begin VB.TextBox txtRepFoot 
  157.          Height          =   1335
  158.          Left            =   120
  159.          MultiLine       =   -1  'True
  160.          ScrollBars      =   2  'Vertical
  161.          TabIndex        =   7
  162.          Tag             =   "</body></html>"
  163.          Text            =   "html.frx":06F6
  164.          Top             =   240
  165.          Width           =   4935
  166.       End
  167.    End
  168.    Begin VB.CommandButton cmdRepUseDefault 
  169.       Caption         =   "&Use Default"
  170.       Height          =   375
  171.       Left            =   3720
  172.       TabIndex        =   19
  173.       Top             =   180
  174.       Width           =   1575
  175.    End
  176.    Begin VB.Frame frmSucHead 
  177.       Caption         =   "Header"
  178.       Height          =   2415
  179.       Left            =   120
  180.       TabIndex        =   18
  181.       Top             =   780
  182.       Width           =   5175
  183.       Begin VB.TextBox txtSucHead 
  184.          Height          =   2085
  185.          Left            =   120
  186.          MultiLine       =   -1  'True
  187.          ScrollBars      =   2  'Vertical
  188.          TabIndex        =   2
  189.          Tag             =   $"html.frx":0707
  190.          Top             =   240
  191.          Width           =   4935
  192.       End
  193.    End
  194.    Begin VB.Frame frmSucFoot 
  195.       Caption         =   "Footer"
  196.       Height          =   1695
  197.       Left            =   120
  198.       TabIndex        =   17
  199.       Top             =   3420
  200.       Width           =   5175
  201.       Begin VB.TextBox txtSucFoot 
  202.          Height          =   1335
  203.          Left            =   120
  204.          MultiLine       =   -1  'True
  205.          ScrollBars      =   2  'Vertical
  206.          TabIndex        =   6
  207.          Tag             =   "</body></html>"
  208.          Text            =   "html.frx":0906
  209.          Top             =   240
  210.          Width           =   4935
  211.       End
  212.    End
  213.    Begin VB.CommandButton cmdSucUseDefault 
  214.       Caption         =   "&Use Default"
  215.       Height          =   375
  216.       Left            =   3720
  217.       TabIndex        =   16
  218.       Top             =   180
  219.       Width           =   1575
  220.    End
  221.    Begin VB.Frame frmErrHead 
  222.       Caption         =   "Header"
  223.       Height          =   2415
  224.       Left            =   120
  225.       TabIndex        =   15
  226.       Top             =   780
  227.       Width           =   5175
  228.       Begin VB.TextBox txtErrHead 
  229.          Height          =   2085
  230.          Left            =   120
  231.          MultiLine       =   -1  'True
  232.          ScrollBars      =   2  'Vertical
  233.          TabIndex        =   4
  234.          Tag             =   $"html.frx":0917
  235.          Top             =   240
  236.          Width           =   4935
  237.       End
  238.    End
  239.    Begin VB.Frame frmErrFoot 
  240.       Caption         =   "Footer"
  241.       Height          =   1695
  242.       Left            =   120
  243.       TabIndex        =   14
  244.       Top             =   3420
  245.       Width           =   5175
  246.       Begin VB.TextBox txtErrFoot 
  247.          Height          =   1335
  248.          Left            =   120
  249.          MultiLine       =   -1  'True
  250.          ScrollBars      =   2  'Vertical
  251.          TabIndex        =   8
  252.          Tag             =   "</body></html>"
  253.          Text            =   "html.frx":0B0C
  254.          Top             =   240
  255.          Width           =   4935
  256.       End
  257.    End
  258.    Begin VB.CommandButton cmdErrUseDefault 
  259.       Caption         =   "&Use Default"
  260.       Height          =   375
  261.       Left            =   3720
  262.       TabIndex        =   13
  263.       Top             =   180
  264.       Width           =   1575
  265.    End
  266.    Begin VB.ComboBox cmbChooseHTML 
  267.       Height          =   315
  268.       ItemData        =   "html.frx":0B1D
  269.       Left            =   720
  270.       List            =   "html.frx":0B30
  271.       TabIndex        =   0
  272.       Text            =   "Summary"
  273.       Top             =   210
  274.       Width           =   2655
  275.    End
  276.    Begin VB.Label lblHTMLChooser 
  277.       Caption         =   "Report:"
  278.       Height          =   255
  279.       Left            =   120
  280.       TabIndex        =   12
  281.       Top             =   240
  282.       Width           =   615
  283.    End
  284. Attribute VB_Name = "frmHTML"
  285. Attribute VB_GlobalNameSpace = False
  286. Attribute VB_Creatable = False
  287. Attribute VB_PredeclaredId = True
  288. Attribute VB_Exposed = False
  289. ' html.frm (frmHTML)
  290. '     Code for running the Edit HTML window.
  291. ' Copyright 1999 Dantz Development Corporation
  292. Option Explicit
  293. ' setApplyAndDefault
  294. '     Enable/disable the Apply and Default buttons.
  295. ' There is one Use Default button for each type of report.
  296. Private Sub setApplyAndDefault(Optional alwaysSet As Boolean = False)
  297.     If (alwaysSet = False And Me.Visible = False) Then Exit Sub
  298.     If (frmWatcher.GetHTMLData(kSummary, kHead) = txtSumHead And _
  299.         frmWatcher.GetHTMLData(kSummary, kFoot) = txtSumFoot And _
  300.         frmWatcher.GetHTMLData(kReport, kHead) = txtRepHead And _
  301.         frmWatcher.GetHTMLData(kReport, kFoot) = txtRepFoot And _
  302.         frmWatcher.GetHTMLData(kSuccess, kHead) = txtSucHead And _
  303.         frmWatcher.GetHTMLData(kSuccess, kFoot) = txtSucFoot And _
  304.         frmWatcher.GetHTMLData(kError, kHead) = txtErrHead And _
  305.         frmWatcher.GetHTMLData(kError, kFoot) = txtErrFoot And _
  306.         frmWatcher.GetHTMLData(kNever, kHead) = txtNvrHead And _
  307.         frmWatcher.GetHTMLData(kNever, kFoot) = txtNvrFoot) Then
  308.         cmdApply.Enabled = False                ' No changes to apply
  309.     Else
  310.         cmdApply.Enabled = True
  311.     End If
  312.     ' Handle the "Use Default" buttons
  313.     If (frmWatcher.GetHTMLDefault(kSummary, kHead) = txtSumHead And _
  314.         frmWatcher.GetHTMLDefault(kSummary, kFoot) = txtSumFoot) Then
  315.         cmdSumUseDefault.Enabled = False
  316.     Else
  317.         cmdSumUseDefault.Enabled = True
  318.     End If
  319.     If (frmWatcher.GetHTMLDefault(kReport, kHead) = txtRepHead And _
  320.         frmWatcher.GetHTMLDefault(kReport, kFoot) = txtRepFoot) Then
  321.         cmdRepUseDefault.Enabled = False
  322.     Else
  323.         cmdRepUseDefault.Enabled = True
  324.     End If
  325.     If (frmWatcher.GetHTMLDefault(kSuccess, kHead) = txtSucHead And _
  326.         frmWatcher.GetHTMLDefault(kSuccess, kFoot) = txtSucFoot) Then
  327.         cmdSucUseDefault.Enabled = False
  328.     Else
  329.         cmdSucUseDefault.Enabled = True
  330.     End If
  331.     If (frmWatcher.GetHTMLDefault(kError, kHead) = txtErrHead And _
  332.         frmWatcher.GetHTMLDefault(kError, kFoot) = txtErrFoot) Then
  333.         cmdErrUseDefault.Enabled = False        ' No changes to apply
  334.     Else
  335.         cmdErrUseDefault.Enabled = True
  336.     End If
  337.     If (frmWatcher.GetHTMLDefault(kNever, kHead) = txtNvrHead And _
  338.         frmWatcher.GetHTMLDefault(kNever, kFoot) = txtNvrFoot) Then
  339.         cmdNvrUseDefault.Enabled = False        ' No changes to apply
  340.     Else
  341.         cmdNvrUseDefault.Enabled = True
  342.     End If
  343. End Sub
  344. ' cmbChooseHTML_*
  345. '     The following may be called whenever the popup menu changes.
  346. Private Sub cmbChooseHTML_Change()
  347.     showForm
  348. End Sub
  349. Private Sub cmbChooseHTML_Click()
  350.     showForm
  351. End Sub
  352. Private Sub cmbChooseHTML_DropDown()
  353.     showForm
  354. End Sub
  355. Private Sub cmbChooseHTML_KeyDown(KeyCode As Integer, Shift As Integer)
  356.     showForm
  357. End Sub
  358. Private Sub cmbChooseHTML_KeyUp(KeyCode As Integer, Shift As Integer)
  359.     showForm
  360. End Sub
  361. ' OKButton_Click
  362. '     Implement the OK button
  363. Private Sub OKButton_Click()
  364.     frmWatcher.InitDataFromForm
  365.     Me.Hide
  366.     setApplyAndDefault
  367. End Sub
  368. ' CancelButton_Click
  369. '     Implement the Cancel button
  370. Private Sub CancelButton_Click()
  371.     frmWatcher.RevertForm
  372.     Me.Hide
  373.     setApplyAndDefault
  374. End Sub
  375. ' cmdApply_Click
  376. '     Implement the Apply button.
  377. Private Sub cmdApply_Click()
  378.     frmWatcher.InitDataFromForm
  379.     setApplyAndDefault
  380. End Sub
  381. ' Implement the Use Default buttons
  382. Private Sub cmdGenUseDefault_Click()
  383.     frmWatcher.UseDefaultFromGen
  384.     setApplyAndDefault
  385. End Sub
  386. Private Sub cmdSumUseDefault_Click()
  387.     frmWatcher.UseDefaultFromSum
  388.     setApplyAndDefault
  389. End Sub
  390. Private Sub cmdRepUseDefault_Click()
  391.     frmWatcher.UseDefaultFromRep
  392.     setApplyAndDefault
  393. End Sub
  394. Private Sub cmdSucUseDefault_Click()
  395.     frmWatcher.UseDefaultFromSuc
  396.     setApplyAndDefault
  397. End Sub
  398. Private Sub cmdErrUseDefault_Click()
  399.     frmWatcher.UseDefaultFromErr
  400.     setApplyAndDefault
  401. End Sub
  402. Private Sub cmdNvrUseDefault_Click()
  403.     frmWatcher.UseDefaultFromNvr
  404.     setApplyAndDefault
  405. End Sub
  406. ' showForm
  407. '     Set up the form and show it. This includes showing the correct fields.
  408. Sub showForm()
  409.     Dim who
  410.     who = cmbChooseHTML
  411.     cmdSumUseDefault.Visible = (who = kSummaryStr)
  412.     frmSumHead.Visible = (who = kSummaryStr)
  413.     frmSumFoot.Visible = (who = kSummaryStr)
  414.     cmdRepUseDefault.Visible = (who = kAllBackupsStr)
  415.     frmRepHead.Visible = (who = kAllBackupsStr)
  416.     frmRepFoot.Visible = (who = kAllBackupsStr)
  417.     cmdSucUseDefault.Visible = (who = kSuccessfulBackupsStr)
  418.     frmSucHead.Visible = (who = kSuccessfulBackupsStr)
  419.     frmSucFoot.Visible = (who = kSuccessfulBackupsStr)
  420.     cmdErrUseDefault.Visible = (who = kFailedBackupsStr)
  421.     frmErrHead.Visible = (who = kFailedBackupsStr)
  422.     frmErrFoot.Visible = (who = kFailedBackupsStr)
  423.     cmdNvrUseDefault.Visible = (who = kNeverBackedUpStr)
  424.     frmNvrHead.Visible = (who = kNeverBackedUpStr)
  425.     frmNvrFoot.Visible = (who = kNeverBackedUpStr)
  426.     setApplyAndDefault True
  427.     Show
  428. End Sub
  429. ' The following call setApplyAndDefault whenever a field changes
  430. Private Sub txtSumHead_Change()
  431.     setApplyAndDefault
  432. End Sub
  433. Private Sub txtSumFoot_Change()
  434.     setApplyAndDefault
  435. End Sub
  436. Private Sub txtRepHead_Change()
  437.     setApplyAndDefault
  438. End Sub
  439. Private Sub txtRepFoot_Change()
  440.     setApplyAndDefault
  441. End Sub
  442. Private Sub txtSucHead_Change()
  443.     setApplyAndDefault
  444. End Sub
  445. Private Sub txtSucFoot_Change()
  446.     setApplyAndDefault
  447. End Sub
  448. Private Sub txtErrHead_Change()
  449.     setApplyAndDefault
  450. End Sub
  451. Private Sub txtErrFoot_Change()
  452.     setApplyAndDefault
  453. End Sub
  454. Private Sub txtNvrHead_Change()
  455.     setApplyAndDefault
  456. End Sub
  457. Private Sub txtNvrFoot_Change()
  458.     setApplyAndDefault
  459. End Sub
  460.