FieldSoftware
Home

PrinterCE SDK
   General Info
   Download
   Purchase & Pricing

Developer Info
   eVC MFC
   eVC C/C++
   eVB

Special Features
   AsciiCE
   PrintDC
   BarcodeCE

Documentation
   PrinterCE SDK
   AsciiCE
   PrintDC
   BarcodeCE

Special Topics
  Supported Printers
  Bluetooth Printing
  Network Printing

.Net CF C# or VB.Net:
  PrinterCE.NetCF SDK

-----------------------------

Software Developers
  PrinterCE SDK
 
PrinterCE.NetCF SDK
  PocketHTMLprint SDK

Printing Utilities
  PrintPocketCE
  PIEprint
  PocketPixPrint
  PocketShot
 
PocketClipPrint

 Arcade Games
  SockOut
  MazeCraze

Contact Info

Example: 
Image Rotation

Demonstrates the ability to rotate images in 90 degree increments and resize them on the fly.

See full size printed output

Option Explicit

Const vbDlgBoxUp = 0
Const vbDlgBoxDown = 1
Const vbDlgBoxDisable = 2
Const vbDlgBoxStatus = 3
Const vbDlgBoxUserCancel = 4
Const vbDlgBoxAbortError = 5

Const vbTwips = 1
Const vbPoints = 2
Const vbPixels = 3
Const vbInches = 5
Const vbMillimeters = 6
Const vbCentimeters = 7

'--------------------------------------

Dim PrinterCE1
Set PrinterCE1 = CreateObject("PrEngineCE.PrinterCE")
ImageRotate  ' Call our subroutine

'--------------------------------------
 
 private sub ImageRotate

   ' Demo rotations of images
   PrinterCE1.SelectPrinter

   Dim ContinueFlag
   'Put PrinterCEs dialog box up and see if user cancelled
   ContinueFlag = PrinterCE1.PrDialogBox(vbDlgBoxUp) 
   If (ContinueFlag <> vbDlgBoxUp) Then
     if (ContinueFlag = vbDlgBoxUserCancel) then 
       MsgBox "User cancelled!"
     else 
       MsgBox "Error found"
     End If
     PrinterCE1.KillDoc
     Exit Sub
   End If

   PrinterCE1.ScaleMode = vbInches 'Lets do everything in inches
   Dim x, y, lp, siz
   x = PrinterCE1.PrPgWidth / 2
   y = PrinterCE1.PrPgHeight / 2
   siz = 3.5

   PrinterCE1.TextX = x
   PrinterCE1.JustifyHoriz = 2
   PrinterCE1.DrawText "ImageRotation Demo"
   PrinterCE1.JustifyHoriz = 0

   For lp = 0 To 3
     PrinterCE1.Rotation = lp 'Rotate North, East, South, West
     PrinterCE1.DrawPicture "\Images\pumpkin.jpg", x, y, siz, siz, True
     siz = siz * 0.66
   Next

   PrinterCE1.EndDoc
End Sub