Print Dialog

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
mark_miller66
Newbie
Posts: 4
Joined: Sat May 30, 2015 4:44 pm
Location: PORT ORANGE, FL USA

Print Dialog

Post by mark_miller66 » Thu Sep 08, 2016 4:23 am

I am unable to print the Dialog box using the attached routine.Where am I going wrong?

Dialog>Dialog1
object Dialog1: TForm
Left = 247
Top = 96
HelpContext = 5000
BorderIcons = [biSystemMenu]
Caption = 'CustomDialog'
ClientHeight = 192
ClientWidth = 476
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Menu = MainMenu
OldCreateOrder = True
ShowHint = True
OnTaskBar = False
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 136
Top = 56
Width = 136
Height = 24
Caption = 'HELLO WORLD'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
Layout = tlCenter
end
object MainMenu: tMSMainMenu
object MenuItem1: tMSMenuItem
Caption = '&Print'
end
end
end
EndDialog>Dialog1

adddialoghandler>Dialog1,MenuItem1,OnClick,DoPrint

SHOW>Dialog1,res



srt>DoPrint
PrintDialog>Dilaog1,poProportional
END>DoPrint

hagchr
Automation Wizard
Posts: 331
Joined: Mon Jul 05, 2010 7:53 am
Location: Stockholm, Sweden

Re: Print Dialog

Post by hagchr » Thu Sep 08, 2016 7:37 am

If I correct the spelling then it works fine for me.

PrintDialog>Dilaog1,poProportional --> PrintDialog>Dialog1,poProportional

mark_miller66
Newbie
Posts: 4
Joined: Sat May 30, 2015 4:44 pm
Location: PORT ORANGE, FL USA

Re: Print Dialog

Post by mark_miller66 » Thu Sep 08, 2016 5:50 pm

Got it.
Thanks for your response - Still unable to print -
but it suggests the problem is not the script but more likely with my system or printer setup

hagchr
Automation Wizard
Posts: 331
Joined: Mon Jul 05, 2010 7:53 am
Location: Stockholm, Sweden

Re: Print Dialog

Post by hagchr » Thu Sep 08, 2016 5:56 pm

If you have your script open then there is an icon (at least in the latest version of MS) for print, there you can double check printer selection, settings etc.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts