Printing Reports
This presentation is the property of its rightful owner.
Sponsored Links
1 / 78

Printing Reports การออกรายงาน PowerPoint PPT Presentation


  • 67 Views
  • Uploaded on
  • Presentation posted in: General

Printing Reports การออกรายงาน. วัตถุที่ยอมให้พิมพ์ข้อมูลลงได้ ( Printable Objects ). แบบฟอร์ม ( Forms ). เครื่องพิมพ์ (Printer). กล่องรูปภาพ ((Picture Box). หน้าต่างอิมมิเดียด ((Immediate Window). คำสั่งพิมพ์. Form1.Print พิมพ์ลง Form1. Printer.Print พิมพ์ลง เครื่องพิมพ์.

Download Presentation

Printing Reports การออกรายงาน

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Printing Reports


(Printable Objects)

  • (Forms)

  • (Printer)

  • ((Picture Box)

  • ((Immediate Window)


Form1.Print Form1

Printer.Print

Picture1.Print Picture1

Debug.Print Immediate Window


Object.Print varList or contList

Object Form, PictuerBox, Printer, Debug ( Immediate Window)

varList 1 ( , ) ( ; )


contList 1 ( , ) ( ; )


(Print Zone) 1 = 14


Private Sub Form_Click()

Form1.Print I am studying VB

End Sub

Form1 Run I am studying VB


Private Sub Form_Click()

Dim j as Integer

Dim x as Single

Dim t as String

j = 1500

x = 12.25

t = Thai

Form1.Print j;x;t

End Sub


Private Sub Form_Click()

Dim j as Integer

Dim x as Single

Dim t as String

j = 1500

x = 12.25

t = Thai

Form1.Print j,x,t

End Sub


Spc(n) n

Tab(n) n

String(n,c) c n


Spc Tab

Private Sub Form_Click()

Dim j as Integer

Dim x as Single

Dim t as String

j = 1500 : x = 12.25 : t = Thai

Form1.Print "Space using Spc

Form1.Print Spc(10); j ; Spc(10) ; x

Form1.Print "Space using Tab"

Form1.Print Tab(10) ; j ; Tab(20) ; x

End Sub


String 10 80

Private Sub Form_Click()

Dim I as Integer

for I = 1 to 10

Form1.Print String(80,.)

Next

End Sub


Currency

Fixed 1 2


Standard 1 2

Percent (%)

Scientific E E


Yes/No Yes 0 No 0

True/False True 0 False 0

On/Off On 0 Off 0


Private Sub Form_Click()

Dim j as Long

Dim x,y as Double

j = 1285547204

x = 0.000000456

y = 7562.2147

Form1.Print j

Form1.Print x

Form1.Print y

End Sub


Currency

Private Sub Form_Click()

Dim j as Long

Dim x,y as Double

j = 1285547204

x = 0.000000456

y = 7562.2157

Form1.Print Format(j, "Currency")

Form1.Print Format(x, "Currency")

Form1.Print Format(y, "Currency")

End Sub


Fixed

Private Sub Form_Click()

Dim j as Long

Dim x,y as Double

j = 1285547204

x = 0.000000456

y = 7562.2157

Form1.Print Format(j, "Fixed")

Form1.Print Format(x, "Fixed")

Form1.Print Format(y, "Fixed")

End Sub


Standard

Private Sub Form_Click()

Dim j as Long

Dim x,y as Double

j = 1285547204

x = 0.000000456

y = 7562.2157

Form1.Print Format(j, "Standard")

Form1.Print Format(x, "Standard")

Form1.Print Format(y, "Standard")

End Sub


Percent

Private Sub Form_Click()

Dim j as Long

Dim x,y as Double

x = 0.0245759

Form1.Print Format(x, Percent")

End Sub


Scientific

Private Sub Form_Click()

Dim j as Long

Dim x,y as Double

j = 1285547204

x = 0.000000456

y = 7562.2157

Form1.Print Format(j, "Scientific")

Form1.Print Format(x, " Scientific ")

Form1.Print Format(y, " Scientific ")

End Sub


Yes/No, True/False On/Off

Private Sub Form_Click()

Dim j,k,i as Integer

j = 0

k = 2

l = 1

Form1.Print Format(j, Yes/No")

Form1.Print Format(k, " True/False ")

Form1.Print Format(l, " On/Off ")

End Sub


0 0

#

.

,

%


E-,E+,e-,e+ E-, e- E+, e+


Long Date

Medium Date

Short Date


Long Time::

Medium Time ::AM PM

Short Time :


Private Sub Form_Click()

Dim dateX As Date

dateX = Now

Form1.Print " General date ", dateX

Form1.Print "Long Date ", Format(dateX, "Long Date")

Form1.Print "Medium Date ", Format(dateX, & _"Medium Date")

Form1.Print "Short Date ", Format(dateX, "Short Date")

Form1.Print " Long Time ", Format(dateX, "Long Time")

Form1.Print " Medium Time ", Format(dateX, "Medium Time")

Form1.Print " Short Time", Format(dateX, "Short Time")

End Sub


Working with Fonts


Name Form1

Form1.Font.Name = AngsanaUPC


Size

Form1.Font.Size = 14

Picture1.Font.Size = 72

Bold

Form1.Font.Bold = True


Form1.Font.Bold = False

Italic

Form1.Font.Italice = True


Underline 1

Picture1.Font.Underline = True

Picture1.Font.Underline = False


StrikeThrough 1

Picture.Font.StrikeThrough = True

Picure1.Font.StrikeThrough = False


Weight

Form1.Font.Weight = 400

Form1.Font.Weight = 700


vbBlack (Black)

vbRed (Red)

vbGreen (Green)

vbYellow(Yellow)

vbBlue (Blue)

vbMagenta (Magenta)

vbCyan (Cyan)

vbWhite ( White )

White


(RGB)

RGB(red, green, blue)

red 0 - 255

green 0 - 255

blue 0 - 255


Black000

Blue00255

Green02550

Cyan0255255

Red25500

Magenta2550255

Yellow2552550

White255255255

White

RGB


(QBColor)

QBColor(color)

color 0 - 15


0Black8Gray

1Blue9Light Blue

2Green10Light Green

3Cyan11Light Cyan

4Red12Light Red

5Magenta13Light Magenta

6Yellow14Light Yellow

7White15Bright White


ForeColor

Form1.ForeColor = vbRed

Form1.ForColor = RGB(255,0,0)

Form1.ForColor = QBColor(4)

Form1.Print

Form1


Form1

Picture1 Picture1

Command1 cmdPrintForm

Command3 cmdPrintPicture

Command3 cmdExit



Run


Displaying Graphic


X Y


X Y

X

Y


(ScaleMode)

(Twip) 1 = 1440 567

(Point) 1 = 72

(Picxel)

(Character) 1 120 240 ).


object.ScaleMode = value

1VbTwips ()

2 VbPoints

3 VbPixels

4 vbCharacters

5 VbInches

6 VbMillimeters

7 VbCentimeters


Drawing Methods


Bitmap, JPEG GIF


Height ScaleHeight

Width ScaleWidth

TopScaleTop

LeftScaleLeft


Height, Width . Height Width

ScaleHeight,ScaleWidth ScaleHeight ScaleWidth


Top

Left

ScaleTop 0

ScaleLeft 0


Top, Left

ScaleTop,ScaleLeft

FORM

Height

ScaleHeight

ScaleWidth

Width


ScaleHeight ScaleWidth

ScaleHeight ScaleWidth (ScaleMode) X Y


ScaleHeight = 100

ScaleWidth = 100

100 100


1

2

3 100

4


0.9

14 (.)


X = 20, Y = 50





  • Cls

  • Line

  • Circle

  • Point

  • Pset

  • Print


object.Line (x1, y1) - Step (x2, y2), [color], [B][F]

object

Line

(x1, y1)

-

Step x,y

Step x,y


(x2, y2) Step Step

color RGB QBColor

B

F FillColor FillStyle


Command1 cmdLine

Command2 cmdExit


Run


Command1 cmdLine

Command2 cmdExit





Command1 cmdLine

Command2 cmdExit




Run


  • Login