home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 5 Developer's Kit / vb5 dev kit.iso / dev / desaware / stgtools / stg_demo / siview.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-11-10  |  10.3 KB  |  339 lines

  1. VERSION 4.00
  2. Begin VB.Form SIView 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Summary Information"
  5.    ClientHeight    =   5655
  6.    ClientLeft      =   1185
  7.    ClientTop       =   1755
  8.    ClientWidth     =   6015
  9.    Height          =   6120
  10.    Left            =   1095
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   5655
  15.    ScaleWidth      =   6015
  16.    Top             =   1380
  17.    Width           =   6195
  18.    Begin VB.TextBox TotalText 
  19.       Enabled         =   0   'False
  20.       Height          =   285
  21.       Left            =   1920
  22.       TabIndex        =   30
  23.       TabStop         =   0   'False
  24.       Top             =   2160
  25.       Width           =   1455
  26.    End
  27.    Begin VB.TextBox PrintText 
  28.       Enabled         =   0   'False
  29.       Height          =   285
  30.       Left            =   1920
  31.       TabIndex        =   28
  32.       TabStop         =   0   'False
  33.       Top             =   3240
  34.       Width           =   3855
  35.    End
  36.    Begin VB.TextBox SaveText 
  37.       Enabled         =   0   'False
  38.       Height          =   285
  39.       Left            =   1920
  40.       TabIndex        =   26
  41.       TabStop         =   0   'False
  42.       Top             =   2880
  43.       Width           =   3855
  44.    End
  45.    Begin VB.CommandButton Command2 
  46.       Cancel          =   -1  'True
  47.       Caption         =   "Cancel"
  48.       Height          =   375
  49.       Left            =   3360
  50.       TabIndex        =   25
  51.       Top             =   5160
  52.       Width           =   1215
  53.    End
  54.    Begin VB.CommandButton Command1 
  55.       Caption         =   "OK"
  56.       Default         =   -1  'True
  57.       Height          =   375
  58.       Left            =   4680
  59.       TabIndex        =   24
  60.       Top             =   5160
  61.       Width           =   1215
  62.    End
  63.    Begin VB.TextBox CharText 
  64.       Enabled         =   0   'False
  65.       Height          =   285
  66.       Left            =   4920
  67.       TabIndex        =   21
  68.       TabStop         =   0   'False
  69.       Top             =   840
  70.       Width           =   855
  71.    End
  72.    Begin VB.TextBox WordText 
  73.       Enabled         =   0   'False
  74.       Height          =   285
  75.       Left            =   4920
  76.       TabIndex        =   20
  77.       TabStop         =   0   'False
  78.       Top             =   480
  79.       Width           =   855
  80.    End
  81.    Begin VB.TextBox SecurityText 
  82.       Enabled         =   0   'False
  83.       Height          =   285
  84.       Left            =   4920
  85.       TabIndex        =   18
  86.       TabStop         =   0   'False
  87.       Top             =   1200
  88.       Width           =   855
  89.    End
  90.    Begin VB.TextBox CommentsText 
  91.       Height          =   1215
  92.       Left            =   1320
  93.       MultiLine       =   -1  'True
  94.       TabIndex        =   5
  95.       Top             =   3720
  96.       Width           =   4455
  97.    End
  98.    Begin VB.TextBox AppText 
  99.       Enabled         =   0   'False
  100.       Height          =   285
  101.       Left            =   1320
  102.       TabIndex        =   17
  103.       TabStop         =   0   'False
  104.       Top             =   1560
  105.       Width           =   2055
  106.    End
  107.    Begin VB.TextBox PageText 
  108.       Enabled         =   0   'False
  109.       Height          =   285
  110.       Left            =   4920
  111.       TabIndex        =   16
  112.       TabStop         =   0   'False
  113.       Top             =   120
  114.       Width           =   855
  115.    End
  116.    Begin VB.TextBox CreateText 
  117.       Enabled         =   0   'False
  118.       Height          =   285
  119.       Left            =   1920
  120.       TabIndex        =   15
  121.       TabStop         =   0   'False
  122.       Top             =   2520
  123.       Width           =   3855
  124.    End
  125.    Begin VB.TextBox RevText 
  126.       Enabled         =   0   'False
  127.       Height          =   285
  128.       Left            =   4920
  129.       TabIndex        =   14
  130.       TabStop         =   0   'False
  131.       Top             =   1560
  132.       Width           =   855
  133.    End
  134.    Begin VB.TextBox KeyText 
  135.       Height          =   285
  136.       Left            =   1320
  137.       TabIndex        =   4
  138.       Top             =   1200
  139.       Width           =   2055
  140.    End
  141.    Begin VB.TextBox AuthorText 
  142.       Height          =   285
  143.       Left            =   1320
  144.       TabIndex        =   3
  145.       Top             =   840
  146.       Width           =   2055
  147.    End
  148.    Begin VB.TextBox SubjectText 
  149.       Height          =   285
  150.       Left            =   1320
  151.       TabIndex        =   2
  152.       Top             =   480
  153.       Width           =   2055
  154.    End
  155.    Begin VB.TextBox TitleText 
  156.       Height          =   285
  157.       Left            =   1320
  158.       TabIndex        =   1
  159.       Top             =   120
  160.       Width           =   2055
  161.    End
  162.    Begin VB.Label Label16 
  163.       Caption         =   "minutes"
  164.       Height          =   255
  165.       Left            =   3480
  166.       TabIndex        =   32
  167.       Top             =   2160
  168.       Width           =   1335
  169.    End
  170.    Begin VB.Label Label15 
  171.       Caption         =   "Total Editing Time:"
  172.       Height          =   255
  173.       Left            =   120
  174.       TabIndex        =   31
  175.       Top             =   2160
  176.       Width           =   1695
  177.    End
  178.    Begin VB.Label Label14 
  179.       Caption         =   "Date/Time Last Printed:"
  180.       Height          =   255
  181.       Left            =   120
  182.       TabIndex        =   29
  183.       Top             =   3240
  184.       Width           =   1695
  185.    End
  186.    Begin VB.Label Label13 
  187.       Caption         =   "Date/Time Last Saved:"
  188.       Height          =   255
  189.       Left            =   120
  190.       TabIndex        =   27
  191.       Top             =   2880
  192.       Width           =   1695
  193.    End
  194.    Begin VB.Label Label12 
  195.       Caption         =   "Characters:"
  196.       Height          =   255
  197.       Left            =   3720
  198.       TabIndex        =   23
  199.       Top             =   840
  200.       Width           =   1095
  201.    End
  202.    Begin VB.Label Label11 
  203.       Caption         =   "Words:"
  204.       Height          =   255
  205.       Left            =   3720
  206.       TabIndex        =   22
  207.       Top             =   480
  208.       Width           =   1095
  209.    End
  210.    Begin VB.Label Label10 
  211.       Caption         =   "Security Level:"
  212.       Height          =   255
  213.       Left            =   3720
  214.       TabIndex        =   19
  215.       Top             =   1200
  216.       Width           =   1095
  217.    End
  218.    Begin VB.Label Label9 
  219.       Caption         =   "Application:"
  220.       Height          =   255
  221.       Left            =   120
  222.       TabIndex        =   13
  223.       Top             =   1560
  224.       Width           =   1095
  225.    End
  226.    Begin VB.Label Label8 
  227.       Caption         =   "Pages:"
  228.       Height          =   255
  229.       Left            =   3720
  230.       TabIndex        =   12
  231.       Top             =   120
  232.       Width           =   1095
  233.    End
  234.    Begin VB.Label Label7 
  235.       Caption         =   "Date/Time Created:"
  236.       Height          =   255
  237.       Left            =   120
  238.       TabIndex        =   11
  239.       Top             =   2520
  240.       Width           =   1455
  241.    End
  242.    Begin VB.Label Label6 
  243.       Caption         =   "Times Revised:"
  244.       Height          =   255
  245.       Left            =   3720
  246.       TabIndex        =   10
  247.       Top             =   1560
  248.       Width           =   1095
  249.    End
  250.    Begin VB.Label Label5 
  251.       Caption         =   "Comments:"
  252.       Height          =   255
  253.       Left            =   120
  254.       TabIndex        =   9
  255.       Top             =   3720
  256.       Width           =   855
  257.    End
  258.    Begin VB.Label Label4 
  259.       Caption         =   "Keywords:"
  260.       Height          =   255
  261.       Left            =   120
  262.       TabIndex        =   8
  263.       Top             =   1200
  264.       Width           =   975
  265.    End
  266.    Begin VB.Label Label3 
  267.       Caption         =   "Subject:"
  268.       Height          =   255
  269.       Left            =   120
  270.       TabIndex        =   7
  271.       Top             =   480
  272.       Width           =   975
  273.    End
  274.    Begin VB.Label Label2 
  275.       Caption         =   "Author:"
  276.       Height          =   255
  277.       Left            =   120
  278.       TabIndex        =   6
  279.       Top             =   840
  280.       Width           =   975
  281.    End
  282.    Begin VB.Label Label1 
  283.       Caption         =   "Title:"
  284.       Height          =   255
  285.       Left            =   120
  286.       TabIndex        =   0
  287.       Top             =   120
  288.       Width           =   975
  289.    End
  290. Attribute VB_Name = "SIView"
  291. Attribute VB_Creatable = False
  292. Attribute VB_Exposed = False
  293. Option Explicit
  294. ' The OK button saves the Summary Information
  295. ' items that can be edited.
  296. Private Sub Command1_Click()
  297.     GlobalRootStorage.siSetTitle (TitleText.text)
  298.     GlobalRootStorage.siSetSubject (SubjectText.text)
  299.     GlobalRootStorage.siSetAuthor (AuthorText.text)
  300.     GlobalRootStorage.siSetKeywords (KeyText.text)
  301.     GlobalRootStorage.siSetComments (CommentsText.text)
  302.     GlobalRootStorage.siSaveSummaryInfo
  303.     GlobalRootStorage.Commit 0 ' don't forget this
  304.     Unload SIView
  305. End Sub
  306. ' The Cancel button just exits.
  307. Private Sub Command2_Click()
  308.     Unload SIView
  309. End Sub
  310. ' Opens the Summary Information stream and reads in
  311. ' all the information.
  312. Private Sub Form_Load()
  313.     Dim printDate As Date
  314.     If (GlobalRootStorage.siOpenSummaryInfo() = False) Then
  315.         MsgBox "Error While Reading Summary Info"
  316.         Exit Sub
  317.     End If
  318.     TitleText.text = GlobalRootStorage.siGetTitle()
  319.     SubjectText.text = GlobalRootStorage.siGetSubject()
  320.     AuthorText.text = GlobalRootStorage.siGetAuthor()
  321.     KeyText.text = GlobalRootStorage.siGetKeywords()
  322.     AppText.text = GlobalRootStorage.siGetApplication()
  323.     PageText.text = CStr(GlobalRootStorage.siGetNumberOfPages())
  324.     WordText.text = CStr(GlobalRootStorage.siGetNumberOfWords())
  325.     CharText.text = CStr(GlobalRootStorage.siGetNumberOfCharacters())
  326.     SecurityText.text = CStr(GlobalRootStorage.siGetSecurity())
  327.     RevText.text = GlobalRootStorage.siGetRevNum()
  328.     TotalText.text = CStr(GlobalRootStorage.siGetTotalEditTime())
  329.     CreateText.text = CStr(GlobalRootStorage.siGetCreateDate())
  330.     SaveText.text = CStr(GlobalRootStorage.siGetLastSaveDate())
  331.     printDate = GlobalRootStorage.siGetLastPrintDate()
  332.     If (printDate = 0) Then
  333.         PrintText.text = "Never printed"
  334.     Else
  335.         PrintText.text = CStr(printDate)
  336.     End If
  337.     CommentsText.text = GlobalRootStorage.siGetComments()
  338. End Sub
  339.