home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / crystal / extras / crpedemo / rpttitle.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-12-15  |  3.2 KB  |  110 lines

  1. VERSION 2.00
  2. Begin Form RptTitle 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Report Title"
  6.    ClientHeight    =   1725
  7.    ClientLeft      =   3000
  8.    ClientTop       =   3450
  9.    ClientWidth     =   3960
  10.    Height          =   2130
  11.    Left            =   2940
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   1725
  16.    ScaleWidth      =   3960
  17.    Top             =   3105
  18.    Width           =   4080
  19.    Begin CommandButton Command1 
  20.       Caption         =   "Help"
  21.       Height          =   375
  22.       Left            =   2640
  23.       TabIndex        =   4
  24.       Top             =   1080
  25.       Width           =   1005
  26.    End
  27.    Begin CommandButton Command4 
  28.       Cancel          =   -1  'True
  29.       Caption         =   "Cancel"
  30.       Height          =   375
  31.       Left            =   1560
  32.       TabIndex        =   3
  33.       Top             =   1080
  34.       Width           =   975
  35.    End
  36.    Begin TextBox Text1 
  37.       Height          =   375
  38.       Left            =   240
  39.       TabIndex        =   0
  40.       Top             =   480
  41.       Width           =   3525
  42.    End
  43.    Begin CommandButton Command3 
  44.       Caption         =   "&OK"
  45.       Default         =   -1  'True
  46.       Height          =   375
  47.       Left            =   360
  48.       TabIndex        =   2
  49.       Top             =   1080
  50.       Width           =   1065
  51.    End
  52.    Begin Label Label1 
  53.       BackColor       =   &H00C0C0C0&
  54.       Caption         =   "Report Title:"
  55.       Height          =   210
  56.       Left            =   270
  57.       TabIndex        =   1
  58.       Top             =   225
  59.       Width           =   1095
  60.    End
  61. Sub Command1_Click ()
  62.  RCode = Shell("Winhelp c:\crw\crw.hlp", 3)
  63.  If RCode = False Then
  64.    MsgBox ("CRWDEMO cannot find the Crystal Help file in C:\CRW directory")
  65.  End If
  66. End Sub
  67. Sub Command2_Click ()
  68.   Dim Title As String
  69.   Dim TextHandle As Integer, TextLength As Integer
  70.   If PEGetReportTitle(JobNum, TextHandle, TextLength) = False Then
  71.      MsgBox ("Cannot retrieve title")
  72.   End If
  73.   'Allocate memory for string
  74.   Title = String(TextLength, " ")
  75.   If PEGetHandleString(TextHandle, Title, TextLength) = False Then
  76.     MsgBox ("Cannot Retrieve the title")
  77.   Else
  78.     Text1.Text = Title
  79.   End If
  80. End Sub
  81. Sub Command3_Click ()
  82.     If PESetReportTitle(JobNum, Text1.Text) = False Then
  83.       RCode = GetErrorString(JobNum)
  84.       MsgBox "PESetReportTitle Error #: " + Str(ErrorCode) + " - " + RCode
  85.       Exit Sub
  86.     End If
  87.     Unload Me
  88. End Sub
  89. Sub Command4_Click ()
  90. Unload Me
  91. End Sub
  92. Sub Form_Load ()
  93.   Dim Title As String
  94.   Dim TextHandle As Integer, TextLength As Integer
  95.   If PEGetReportTitle(JobNum, TextHandle, TextLength) = False Then
  96.      MsgBox ("Unable to retrieve report title!")
  97.   Else
  98.     'Allocate memory for string
  99.     Title = String(TextLength, " ")
  100.     If PEGetHandleString(TextHandle, Title, TextLength) = False Then
  101.       MsgBox ("Unable to retrieve report title!")
  102.     Else
  103.       Text1.Text = Title
  104.     End If
  105.   End If
  106. End Sub
  107. Sub MenuFile_Click ()
  108.  Unload Me
  109. End Sub
  110.