home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / printf / directpr.frm (.txt) next >
Encoding:
Visual Basic Form  |  1995-05-02  |  1.3 KB  |  48 lines

  1. VERSION 2.00
  2. Begin Form DirectPrint 
  3.    Caption         =   "Direct Print"
  4.    ClientHeight    =   1605
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1485
  7.    ClientWidth     =   4725
  8.    Height          =   2010
  9.    Left            =   1035
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   1605
  12.    ScaleWidth      =   4725
  13.    Top             =   1140
  14.    Width           =   4845
  15.    Begin CommandButton buCommand 
  16.       Caption         =   "&Print"
  17.       Height          =   375
  18.       Left            =   1620
  19.       TabIndex        =   0
  20.       Top             =   990
  21.       Width           =   1005
  22.    End
  23.    Begin TextBox txtFile 
  24.       Height          =   285
  25.       Left            =   450
  26.       TabIndex        =   2
  27.       Text            =   "c:\autoexec.bat"
  28.       Top             =   540
  29.       Width           =   3795
  30.    End
  31.    Begin Label Label1 
  32.       Caption         =   "&Filename:"
  33.       Height          =   285
  34.       Left            =   450
  35.       TabIndex        =   1
  36.       Top             =   270
  37.       Width           =   2355
  38.    End
  39. Sub buCommand_Click ()
  40.     FileName$ = txtFile.Text
  41.     rPrint% = PrintFile(FileName$)
  42.     If rPrint% = 0 Then
  43.         MsgBox "Could not print " + FileName$
  44.     Else
  45.         MsgBox "Printed " + FileName$
  46.     End If
  47. End Sub
  48.