F
Flavio Zanellato
Hello,
I've a problem calling the above function in VB.NET :
nSize = DocumentProperties(hWnd, hPrinter, szPrinterName, oDevMode,
pDevMode, DM_OUT_BUFFER Or DM_PROMPT)
I seems that the DM_PROMPT (value &H4) is ignored.
In my old VB6 module passing a window handle (hWnd) with the prompt flag,
opens the printer properties.
In VB.NET all is ok (return code, return DEVMODE structure) except for the
printer window properties that does not show up.
I pass the form Me.Handle to the hWnd parameter.
This is the declaration :
<DllImport("winspool.Drv", EntryPoint:="DocumentPropertiesW",
SetLastError:=True, CharSet:=CharSet.Unicode, ExactSpelling:=True,
CallingConvention:=CallingConvention.StdCall)> _
Public Function DocumentProperties(ByVal hWnd As IntPtr, ByVal hPrinter As
IntPtr, ByVal pDeviceName As String, ByVal pDevModeOutput() As Byte, ByVal
pDevModeInput As DEVMODE, ByVal fMode As Int32) As Int32
End Function
Does anyone have any ideas ?
Thanks in advance.
I've a problem calling the above function in VB.NET :
nSize = DocumentProperties(hWnd, hPrinter, szPrinterName, oDevMode,
pDevMode, DM_OUT_BUFFER Or DM_PROMPT)
I seems that the DM_PROMPT (value &H4) is ignored.
In my old VB6 module passing a window handle (hWnd) with the prompt flag,
opens the printer properties.
In VB.NET all is ok (return code, return DEVMODE structure) except for the
printer window properties that does not show up.
I pass the form Me.Handle to the hWnd parameter.
This is the declaration :
<DllImport("winspool.Drv", EntryPoint:="DocumentPropertiesW",
SetLastError:=True, CharSet:=CharSet.Unicode, ExactSpelling:=True,
CallingConvention:=CallingConvention.StdCall)> _
Public Function DocumentProperties(ByVal hWnd As IntPtr, ByVal hPrinter As
IntPtr, ByVal pDeviceName As String, ByVal pDevModeOutput() As Byte, ByVal
pDevModeInput As DEVMODE, ByVal fMode As Int32) As Int32
End Function
Does anyone have any ideas ?
Thanks in advance.