Académique Documents
Professionnel Documents
Culture Documents
ANDHRA PRADESH
Name : P. Sri Vidya
Designation : Lecturer
Branch : DCCP
Institute : Govt. Polytechnic for Women, Bheemili
Semester : VI Semester
Subject : Visual Basic II
Subject code : CCP- 603
Topic : Displaying and Printing
Information(4/10)
Sub Topic : Displaying tabular data in report form
Duration : 100 min.
CCP603.9 TO 10 1
Teaching Aids : PPT
Recap
CCP603.9 TO 10 2
Objectives
CCP603.9 TO 10 3
KNOWN TO UNKNOWN
CCP603.9 TO 10 4
Print command exists in which menu?
File
CCP603.9 TO 10 5
Techniques to print text and graphics in VB
Print command
Printer object
PrintForm method
CCP603.9 TO 10 6
Print Command
CCP603.9 TO 10 7
Printers Collection Object
CCP603.9 TO 10 8
Print Command in VB
Click on File Print
CCP603.9 TO 10 9
Options of Print dialog box
Printer -
Identifies the printer to which we are printing
Range -
Determines the range we print
It may be entire project or current module or selected portion
Selection -
Prints the currently selected code
Current module -
Prints the forms and / or code for the currently selected
module
CCP603.9 TO 10 10
Current Project -
Prints the forms and / or code for the entire
project
Print What -
Determines what we print depending on what
we selected as the range
Form Image -
Prints the form images
Code -
Prints the code for the selected range
CCP603.9 TO 10 11
Print Quality -
Determines whether to print
High
Medium
Low or
Draft
Output quality
CCP603.9 TO 10 12
Print to File -
Sends the print to file selected in the Print to
File dialog box.
OK -
Prints the selection
Cancel -
Closes the dialog box without printing
CCP603.9 TO 10 13
Setup -
Displays the standard Print Setup dialog box
CCP603.9 TO 10 14
Options of Print Setup
Printer -
Allows you to specify the printer. If you don't
select a printer, Visual Basic will print to the
Windows default printer
Name -
Displays a list of available printers
Status -
Displays the status of the printer and whether
it is ready to print
Type -
Displays the type of printer
CCP603.9 TO 10 15
Options of Print Setup
Where -
Displays the location of the printer. If the
printer is on a network, displays the path to the
server
Comment -
Displays the physical location of the printer and
additional information
Properties -
Opens the Properties dialog box specific to
the printer where you can choose additional
options such as paper and the way graphics
are printed
CCP603.9 TO 10 16
Options of Print Setup
Paper -
Allows you to select the paper size and source
(from among those available for the printer)
The sizes and sources available depend on the
printer you have selected and they change
when you change printers
Size -
Displays a list of the available paper sizes
Source -
Displays the available source of paper for the
printer you choose
CCP603.9 TO 10 17
Options of Print Setup
Orientation -
Allows you to specify whether the program is
to print in Portrait or Landscape orientation.
CCP603.9 TO 10 18
Procedure to print text and graphics using
Print command.
CCP603.9 TO 10 19
Printer object
CCP603.9 TO 10 20
What is the use of printer object?
CCP603.9 TO 10 21
How can we draw text and graphics on
printer object?
CCP603.9 TO 10 22
What are graphics methods?
CCP603.9 TO 10 23
List of some graphics methods
Circle
Cls
Line
Paintpicture
Point
print
Pset
CCP603.9 TO 10 24
How can we send output the printer ?
CCP603.9 TO 10 25
Advantages of Printer object
CCP603.9 TO 10 26
Drawbacks of Printer object
CCP603.9 TO 10 27
Properties of Printer object
CCP603.9 TO 10 28
Copies Property
CCP603.9 TO 10 29
Current X,Current Y property
CCP603.9 TO 10 30
Device Name property
CCP603.9 TO 10 31
Draw mode property
CCP603.9 TO 10 33
Duplex property
Returns or sets a value that determines whether a
page is printed on both slides
CCP603.9 TO 10 34
Methods of printer object
Enddoc method -
Terminates a print operation sent to the printer
object,releasing the document to the print device
Syntax: Object. Enddoc
CCP603.9 TO 10 35
KillDoc Method -
Immediately terminates the current print job
Syntax: Object.KillDoc
CCP603.9 TO 10 36
New page Method
Ends the current page and advances to the next
page on the printer object
Syntax : Object.New page
CCP603.9 TO 10 37
Paint picture Method
Draws the contents of a graphics file on printer
pset method
Sets a point on an object to a specified color
CCP603.9 TO 10 38
PrintForm method
CCP603.9 TO 10 39
What items can be printed using PrintForm
method?
CCP603.9 TO 10 40
Advantages of PrintForm method
CCP603.9 TO 10 41
Disadvantages of PrintForm method
CCP603.9 TO 10 42
QUIZ
1. Print command directs
a) Only text to the default printer
b) Only graphics to the default printer
c) Both text and graphics to the default printer
d) None of the above
CCP603.9 TO 10 43
1. The object that contains all the available printers
on the OS.
a) Print object
b) Printers collection
c) PrintForm method
d) Print method
CCP603.9 TO 10 44
3. Printer object is
a) Device independent drawing space
b) Device dependent drawing space
c) Not a drawing space
d) None of the above
CCP603.9 TO 10 45
4. Which method is used to send output directly to the
printer?
a) EndDoc method
b) KillDoc method
c) NewPage method
d) Paintpicture method
CCP603.9 TO 10 46
5. Which method is used to print a form bit-by-bit to
printer?
PrintForm method
CCP603.9 TO 10 47
Frequently asked questions
CCP603.9 TO 10 48
Summary
CCP603.9 TO 10 49
THANK YOU
CCP603.9 TO 10 50