Are you kind enough to tell me this
Are you kind enough to tell me the API calls i should make to get the Page
setup dialog ? Not the Printer dialog, i need the pagesetup dialog. I will
very much appreciate if you include a code snipet.
Have a nice day !
[235 byte] By [
Faraw] at [2007-11-10 0:20:47]

# 1 Re: Are you kind enough to tell me this
On a form w/ a command button:
Option Explicit
Private Type POINTAPI
x As Long
y As Long
End Type
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Type PageSetupDlg
lStructSize As Long
hwndOwner As Long
hDevMode As Long
hDevNames As Long
flags As Long
ptPaperSize As POINTAPI
rtMinMargin As RECT
rtMargin As RECT
hInstance As Long
lCustData As Long
lpfnPageSetupHook As Long
lpfnPagePaintHook As Long
lpPageSetupTemplateName As String
hPageSetupTemplate As Long
End Type
Private Declare Function PageSetupDlg Lib "comdlg32.dll" Alias
"PageSetupDlgA" (pPagesetupdlg As PageSetupDlg) As Long
Private Sub Command1_Click()
ShowPageDlg
End Sub
Private Sub Form_Load()
Command1.Caption = "ShowPageSetup"
End Sub
Private Sub ShowPageDlg()
Dim PageDlg As PageSetupDlg
PageDlg.lStructSize = Len(PageDlg)
PageDlg.hwndOwner = Me.hWnd
PageDlg.hInstance = App.hInstance
PageDlg.flags = 0
PageSetupDlg PageDlg
End Sub
...HTH
AM
"Faraw" <betemariam@hotmail.com> wrote in message
news:38da8822$1@news.dev-archive.com...
>
> Are you kind enough to tell me the API calls i should make to get the Page
> setup dialog ? Not the Printer dialog, i need the pagesetup dialog. I will
> very much appreciate if you include a code snipet.
>
> Have a nice day !
# 2 Re: Are you kind enough to tell me this
On a form w/ a command button:
Option Explicit
Private Type POINTAPI
x As Long
y As Long
End Type
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Type PageSetupDlg
lStructSize As Long
hwndOwner As Long
hDevMode As Long
hDevNames As Long
flags As Long
ptPaperSize As POINTAPI
rtMinMargin As RECT
rtMargin As RECT
hInstance As Long
lCustData As Long
lpfnPageSetupHook As Long
lpfnPagePaintHook As Long
lpPageSetupTemplateName As String
hPageSetupTemplate As Long
End Type
Private Declare Function PageSetupDlg Lib "comdlg32.dll" Alias
"PageSetupDlgA" (pPagesetupdlg As PageSetupDlg) As Long
Private Sub Command1_Click()
ShowPageDlg
End Sub
Private Sub Form_Load()
Command1.Caption = "ShowPageSetup"
End Sub
Private Sub ShowPageDlg()
Dim PageDlg As PageSetupDlg
PageDlg.lStructSize = Len(PageDlg)
PageDlg.hwndOwner = Me.hWnd
PageDlg.hInstance = App.hInstance
PageDlg.flags = 0
PageSetupDlg PageDlg
End Sub
...HTH
AM
"Faraw" <betemariam@hotmail.com> wrote in message
news:38da8822$1@news.dev-archive.com...
>
> Are you kind enough to tell me the API calls i should make to get the Page
> setup dialog ? Not the Printer dialog, i need the pagesetup dialog. I will
> very much appreciate if you include a code snipet.
>
> Have a nice day !