Re-size Print Preview
- From: "Jim Y" <j.s.yablonsky@xxxxxxxxxxxxxx>
- Date: Fri, 23 Sep 2005 19:47:00 GMT
I have a test program that permits display of the form (preview) at full size using a PictureBox on
the screen. So far so good - it works.
What must I do to permit the user to enlarge the display if something is too small to be read and
they want enlarge it?
What must I do to permit the user to reduce the display and view the entire page on the screen?
Thank you,
Jim Y
Here is some of the code:
===============================
Option Explicit
'switch to determine whether Query or Wedding Query
Public gEventType As Integer
'switch to determine whether screen display or printer copy
Public gScrnPrntr As String 'use Screen or Printer to identify
Private Sub Form_Load()
'gEventType 0 for Wedding Query, 1 for General Query
'NOTE Since the form is in twips, the PictureBox must be positioned
' and sized using twips. In the PictureBox, inches are used.
' Try 1.2 enlargement and 0.6 reduced size (full screen) for form
Pic.ScaleMode = 5 'inches in the PictureBox, Form1 is twips
Pic.Width = 8.5 * 1440 '12,240 twips wide
Pic.Height = 11 * 1440 '15,840 twips high
Pic.Top = 0.25 * 1440 '360 twips wide
Pic.Left = (Screen.Width - Pic.Width) / 2
With VScroll1
.Left = Pic.Left + Pic.Width 'Position VScroll1 on right of Pic
.Top = 0 '1440
.Height = 10360 '7200
.Max = 60 '60% instead of 100% to not go up too far
.LargeChange = 30 'two clicks to scan full page - 60/30=2
.SmallChange = 6 'ten clicks to scan full page - 60/6=10
End With
Private Sub mnuQueryDisplay_Click()
Pic.Cls
gEventType = 1 'for General Query
gScrnPrntr = "Screen" 'use Screen or Printer
Call QueryForms 'in ModDisplay
End Sub
End Sub
==================================================
Public Sub QueryForms()
Dim strPrinted As String 'date & time form was printed - reserved
Dim strPrntStrng As String 'combined items on one line
Dim intEventType As Integer 'Zero (0) for Wedding, One (1) for General
Dim strType As String
Dim Obj As Object 'Form1.Pic or Printer
<SNIP>
'Get Date and time of printing
strPrinted = "Printed: " & Format(Now, "ddd, mmm, dd, yyyy") _
& " " & Format(Now, "hh:mm AM/PM")
If Form1.gScrnPrntr = "Screen" Then
Set Obj = Form1.Pic
ElseIf Form1.gScrnPrntr = "Printer" Then
Set Obj = Printer
Else
Exit Sub
End If
'Get Query/Wedding Query switch
intEventType = Form1.gEventType
'Draw border around the page - 0.62 inch border all around
Obj.DrawWidth = 4
Obj.Line (0.62, 0.62)-(7.88, 10.25), , B
'Print Company Name, Adress and Phone numbers
Obj.FontName = "Arial"
Obj.FontSize = 12
Obj.FontBold = True
Obj.CurrentX = 0.69
Obj.CurrentY = 0.66
Obj.Print "ABCDEFGHIJKLMNOPQRSTUVWXYZQWE"
<SNIP>
.
- Follow-Ups:
- Re: Re-size Print Preview
- From: Mike Williams
- Re: Re-size Print Preview
- From: Mike Williams
- Re: Re-size Print Preview
- From: Mike Williams
- Re: Re-size Print Preview
- Prev by Date: Re: Advice for PDF printer driver (VB6)
- Next by Date: Re: For days I have toiled...
- Previous by thread: API Newbie
- Next by thread: Re: Re-size Print Preview
- Index(es):
Relevant Pages
|