www.pudn.com > stu_rag.rar > frmReport.frm, change:2003-04-04,size:2619b


VERSION 5.00 
Begin VB.Form frmReport  
   BackColor       =   &H00FFC0C0& 
   BorderStyle     =   0  'None 
   Caption         =   "Form1" 
   ClientHeight    =   6465 
   ClientLeft      =   0 
   ClientTop       =   0 
   ClientWidth     =   6840 
   LinkTopic       =   "Form1" 
   ScaleHeight     =   6465 
   ScaleWidth      =   6840 
   ShowInTaskbar   =   0   'False 
   StartUpPosition =   2  'CenterScreen 
   Begin VB.Frame FrameMain  
      Height          =   6255 
      Left            =   120 
      TabIndex        =   0 
      Top             =   120 
      Width           =   6615 
      Begin VB.CommandButton CmdExit  
         Caption         =   "˳" 
         Height          =   375 
         Left            =   5640 
         TabIndex        =   3 
         Top             =   5760 
         Width           =   735 
      End 
      Begin VB.CommandButton CmdPrint  
         Caption         =   "ӡ" 
         Height          =   375 
         Left            =   4680 
         TabIndex        =   2 
         Top             =   5760 
         Width           =   855 
      End 
      Begin VB.TextBox txtFile  
         BeginProperty Font  
            Name            =   "" 
            Size            =   15 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   5415 
         Left            =   120 
         Locked          =   -1  'True 
         MultiLine       =   -1  'True 
         ScrollBars      =   2  'Vertical 
         TabIndex        =   1 
         Top             =   240 
         Width           =   6375 
      End 
   End 
End 
Attribute VB_Name = "frmReport" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Private varFileName As String 
Property Let FileName(ByVal Value As String) 
    varFileName = Value 
    If Dir(Value, vbNormal) <> "" Then 
        Dim strFile As String 
        strFile = "" 
        On Error Resume Next 
        Open Value For Input As #1 
            While Not EOF(1) 
                Line Input #1, strFile 
                Me.txtFile.Text = Me.txtFile.Text & strFile & vbCrLf 
            Wend 
        Close #1 
    End If 
End Property 
 
Private Sub CmdExit_Click() 
    Unload Me 
End Sub 
 
Private Sub CmdPrint_Click() 
    Printer.Font = Me.txtFile.Font 
    Printer.Print Me.txtFile.Text 
    Printer.EndDoc 
End Sub