How can I show Page setup dialog
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | 'System & API - How can I show Page setup dialog 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 |
Related posts:
- How to show Page Setup Dialog using API
- How to show Color Dialog using API
- How to show Print Dialog using API
- How to show File Open dialog without using Common Dialog Control
- How to show File Save dialog without using Common Dialog Control
- How to show File Save As Dialog using API
- Common Dialog option through API
- How to show Add/Remove Programs Properties (Windows Setup)
- How to check the window state of an external application
- How to show Run Dialog