|
-
Mar 10th, 2007, 06:26 AM
#1
Thread Starter
New Member
Problem with Printing in Vista
Hello.
We have a problem with printing in Vista.
Using for example:
numcopies = commondialog1.copies
or
numcopies = printer.copies
is generating "1"
No matter what the user input was.
So even if you want to print 4 copies, it will only print one.
Works obvious perfectly on XP.
Anyone with a solution?
Thanks in advance
-
Mar 10th, 2007, 08:26 AM
#2
Hyperactive Member
Re: Problem with Printing in Vista
Shouldn't your command be?
Code:
Printer.Copies = CommonDialog1.Copies
-
Mar 10th, 2007, 03:02 PM
#3
Thread Starter
New Member
Re: Problem with Printing in Vista
Well.
It doesn't matter. You ca use both.
In any case the value returned will be "1", no matter the user input.
So when using
Printer.Copies = CommonDialog1.Copies
And the user chooses 4 copies, it will still only return "1".
I'm quite certain it is a bug in Vista.
Anyone know how to work around it?
-
Mar 10th, 2007, 03:09 PM
#4
Re: Problem with Printing in Vista
Looks like its a VB 6 bug and not a Vista bug per se.
I tested it on Vista and VB 6 and same issue as you. Then again I tested it on Vista and VB.NET 2005 and it works correctly.
I would think its part of the bugs why VB 6 is unsupported on Vista.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 10th, 2007, 06:45 PM
#5
Thread Starter
New Member
Re: Problem with Printing in Vista
According to Microsoft http://msdn2.microsoft.com/en-us/vbrun/ms788708.aspx it shouldn't be that way. It should work the same way on Vista as on Xp. But it doesn't.
Anyone that knows a way to work around it?
Thankful if anyone knows!
-
Mar 10th, 2007, 06:57 PM
#6
Re: Problem with Printing in Vista
No, I read it the other way around.
Tested and Not Shipping In Windows Vista
'...
comdlg32.ocx
'...
So they only tested it and are not including it in shipments because its not up to compatibility standards.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 10th, 2007, 07:01 PM
#7
Re: Problem with Printing in Vista
More precisly:
For Windows Vista, key Visual Basic 6.0 runtime files are shipping as a part of the operating system and will be supported for the lifetime of Windows Vista.
'....
Binaries that do not ship on Windows Vista will follow their planned support lifetime. These files are being tested for compatibility as part of our testing of Visual Basic 6.0 applications running on Windows Vista, but they will need to be deployed by the application setup and will not be supported as part of Windows Vista. The list of runtime files distributed with Vista can be found below.
So you see, its not supported but is tested on.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 10th, 2007, 07:53 PM
#8
Thread Starter
New Member
Re: Problem with Printing in Vista
Hello. Microsoft writes:
The Visual Basic team is committed to “It Just Works” compatibility for Visual Basic 6.0 applications on Windows® Vista™. The Visual Basic team’s goal is that Visual Basic 6.0 applications that run on Windows XP will also run on Windows Vista.
BUT
That is NOT my point.
Obviouslly it is not working.
BUT anyone knows how to solve it.
That menas. Print more then one copies using Vista ?
There are still a huge amount of software programmed in VB6.
There got to be a solution.
Anyone knows?
-
Mar 10th, 2007, 11:30 PM
#9
Hyperactive Member
Re: Problem with Printing in Vista
Does your printer support Multiple copies?
Another fix could be to generate the copies by sending the report pages to the selected device 4 times?
-
Mar 10th, 2007, 11:32 PM
#10
Re: Problem with Printing in Vista
But thats not relevant. Reading the commondialog .Copies property always returns "1" even when you select "2" or "99". If you can not read what the user has selected in the dialog box then its useless in trying to know how many copies to print.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 11th, 2007, 05:09 AM
#11
Thread Starter
New Member
Re: Problem with Printing in Vista
But is there a way around this?
Something else to use instead of Commondialogbox ?
-
Mar 11th, 2007, 11:11 AM
#12
New Member
Re: Problem with Printing in Vista
It may always read 1, however if that is true, than you can control the amount of loops that will be created. You asked for a work around, that sounds like one to me. I'm sure we'll see quite a few "fixes" for vb6 on Vista, but thats just my opinion.
-
Mar 11th, 2007, 11:11 AM
#13
Re: Problem with Printing in Vista
Sure, create your own form duplicaating the features you need. The Printer object still seems to work fine.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 11th, 2007, 12:57 PM
#14
Hyperactive Member
Re: Problem with Printing in Vista
Does it always return 1 using the Printer API dialog?
Code:
Public Function ShowPrinter(frmOwner As Form, Optional PrintFlags As Long) As Boolean
Dim PrintDlg As PRINTDLG_TYPE
Dim DevMode As DEVMODE_TYPE
Dim DevName As DEVNAMES_TYPE
Dim lpDevMode As Long
Dim lpDevName As Long
'Dim bReturn As Integer
Dim objPrinter As Printer
Dim NewPrinterName As String
' Use PrintDialog to get the handle to a memory
' block with a DevMode and DevName structures
ShowPrinter = True
PrintDlg.lStructSize = Len(PrintDlg)
PrintDlg.hwndOwner = frmOwner.hWnd
PrintDlg.flags = PrintFlags
On Error Resume Next
'Set the current orientation and duplex setting
DevMode.dmDeviceName = Printer.DeviceName
DevMode.dmSize = Len(DevMode)
DevMode.dmFields = DM_ORIENTATION Or DM_DUPLEX
DevMode.dmPaperWidth = Printer.Width
DevMode.dmOrientation = Printer.Orientation
DevMode.dmPaperSize = Printer.PaperSize
DevMode.dmDuplex = Printer.Duplex
On Error GoTo ErrorHandler
'Allocate memory for the initialization hDevMode structure
'and copy the settings gathered above into this memory
PrintDlg.hDevMode = GlobalAlloc(GMEM_MOVEABLE Or GMEM_ZEROINIT, Len(DevMode))
lpDevMode = GlobalLock(PrintDlg.hDevMode)
If lpDevMode > 0 Then
CopyMemory ByVal lpDevMode, DevMode, Len(DevMode)
'bReturn = GlobalUnlock(PrintDlg.hDevMode)
Call GlobalUnlock(PrintDlg.hDevMode)
End If
'Set the current driver, device, and port name strings
With DevName
.wDriverOffset = 8
.wDeviceOffset = .wDriverOffset + 1 + Len(Printer.DriverName)
.wOutputOffset = .wDeviceOffset + 1 + Len(Printer.Port)
.wDefault = 0
End With
With Printer
DevName.extra = .DriverName & vbNullChar & .DeviceName & vbNullChar & .Port & vbNullChar
End With
'Allocate memory for the initial hDevName structure
'and copy the settings gathered above into this memory
PrintDlg.hDevNames = GlobalAlloc(GMEM_MOVEABLE Or GMEM_ZEROINIT, Len(DevName))
lpDevName = GlobalLock(PrintDlg.hDevNames)
If lpDevName > 0 Then
CopyMemory ByVal lpDevName, DevName, Len(DevName)
'bReturn = GlobalUnlock(lpDevName)
Call GlobalUnlock(lpDevName)
End If
If PrintDialog(PrintDlg) <> 0 Then
ShowPrinter = True
lpDevName = GlobalLock(PrintDlg.hDevNames)
CopyMemory DevName, ByVal lpDevName, 45
'bReturn = GlobalUnlock(lpDevName)
Call GlobalUnlock(lpDevName)
GlobalFree PrintDlg.hDevNames
'Next get the DevMode structure and set the printer
'properties appropriately
lpDevMode = GlobalLock(PrintDlg.hDevMode)
CopyMemory DevMode, ByVal lpDevMode, Len(DevMode)
'bReturn = GlobalUnlock(PrintDlg.hDevMode)
Call GlobalUnlock(PrintDlg.hDevMode)
GlobalFree PrintDlg.hDevMode
NewPrinterName = UCase$(Left(DevMode.dmDeviceName, InStr(DevMode.dmDeviceName, vbNullChar) - 1))
If Printer.DeviceName <> NewPrinterName Then
For Each objPrinter In Printers
If UCase$(objPrinter.DeviceName) = NewPrinterName Then
Set Printer = objPrinter
End If
Next objPrinter
End If
On Error Resume Next
Printer.Copies = DevMode.dmCopies
Printer.Duplex = DevMode.dmDuplex
Printer.Orientation = DevMode.dmOrientation
Printer.PaperSize = DevMode.dmPaperSize
Printer.PrintQuality = DevMode.dmPrintQuality
Printer.ColorMode = DevMode.dmColor
Printer.PaperBin = DevMode.dmDefaultSource
Else
ShowPrinter = False
End If
Exit Function
ErrorHandler:
ShowPrinter = True
End Function
Code:
If ShowPrinter(Me, cdlPDNoSelection Or cdlPDNoPageNums Or cdlPDNoWarning Or cdlPDUseDevModeCopies Or cdlPDHidePrintToFile) Then
Printer.Print "Test"
Printer.EndDoc
End If
If that still doesn't work you could always make a custom Print Dialog. Here is an example:
http://www.freevbcode.com/ShowCode.asp?ID=3847
Last edited by Hassan Basri; Mar 11th, 2007 at 01:03 PM.
-
Mar 11th, 2007, 01:27 PM
#15
Re: Problem with Printing in Vista
Thats the code from allapi.mentalis.org? ...
Complete example trimmed down for just the print dialog
vb Code:
Option Explicit
Const CCHDEVICENAME = 32
Const CCHFORMNAME = 32
Const GMEM_MOVEABLE = &H2
Const GMEM_ZEROINIT = &H40
Const DM_DUPLEX = &H1000&
Const DM_ORIENTATION = &H1&
Const PD_PRINTSETUP = &H40
Const PD_DISABLEPRINTTOFILE = &H80000
Private Type PRINTDLG_TYPE
lStructSize As Long
hwndOwner As Long
hDevMode As Long
hDevNames As Long
hDC As Long
flags As Long
nFromPage As Integer
nToPage As Integer
nMinPage As Integer
nMaxPage As Integer
nCopies As Integer
hInstance As Long
lCustData As Long
lpfnPrintHook As Long
lpfnSetupHook As Long
lpPrintTemplateName As String
lpSetupTemplateName As String
hPrintTemplate As Long
hSetupTemplate As Long
End Type
Private Type DEVNAMES_TYPE
wDriverOffset As Integer
wDeviceOffset As Integer
wOutputOffset As Integer
wDefault As Integer
extra As String * 100
End Type
Private Type DEVMODE_TYPE
dmDeviceName As String * CCHDEVICENAME
dmSpecVersion As Integer
dmDriverVersion As Integer
dmSize As Integer
dmDriverExtra As Integer
dmFields As Long
dmOrientation As Integer
dmPaperSize As Integer
dmPaperLength As Integer
dmPaperWidth As Integer
dmScale As Integer
dmCopies As Integer
dmDefaultSource As Integer
dmPrintQuality As Integer
dmColor As Integer
dmDuplex As Integer
dmYResolution As Integer
dmTTOption As Integer
dmCollate As Integer
dmFormName As String * CCHFORMNAME
dmUnusedPadding As Integer
dmBitsPerPel As Integer
dmPelsWidth As Long
dmPelsHeight As Long
dmDisplayFlags As Long
dmDisplayFrequency As Long
End Type
Private Declare Function PrintDialog Lib "comdlg32.dll" Alias "PrintDlgA" (pPrintdlg As PRINTDLG_TYPE) As Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (hpvDest As Any, hpvSource As Any, ByVal cbCopy As Long)
Private Declare Function GlobalLock Lib "kernel32" (ByVal hMem As Long) As Long
Private Declare Function GlobalUnlock Lib "kernel32" (ByVal hMem As Long) As Long
Private Declare Function GlobalAlloc Lib "kernel32" (ByVal wFlags As Long, ByVal dwBytes As Long) As Long
Private Declare Function GlobalFree Lib "kernel32" (ByVal hMem As Long) As Long
Private Sub Command1_Click()
ShowPrinter Me
End Sub
Private Sub Form_Load()
Command1.Caption = "ShowPrinter"
End Sub
Public Sub ShowPrinter(frmOwner As Form, Optional PrintFlags As Long)
'-> Code by Donald Grover
Dim PrintDlg As PRINTDLG_TYPE
Dim DevMode As DEVMODE_TYPE
Dim DevName As DEVNAMES_TYPE
Dim lpDevMode As Long, lpDevName As Long
Dim bReturn As Integer
Dim objPrinter As Printer, NewPrinterName As String
' Use PrintDialog to get the handle to a memory
' block with a DevMode and DevName structures
PrintDlg.lStructSize = Len(PrintDlg)
PrintDlg.hwndOwner = frmOwner.hWnd
PrintDlg.flags = PrintFlags
On Error Resume Next
'Set the current orientation and duplex setting
DevMode.dmDeviceName = Printer.DeviceName
DevMode.dmSize = Len(DevMode)
DevMode.dmFields = DM_ORIENTATION Or DM_DUPLEX
DevMode.dmPaperWidth = Printer.Width
DevMode.dmOrientation = Printer.Orientation
DevMode.dmPaperSize = Printer.PaperSize
DevMode.dmDuplex = Printer.Duplex
On Error GoTo 0
'Allocate memory for the initialization hDevMode structure
'and copy the settings gathered above into this memory
PrintDlg.hDevMode = GlobalAlloc(GMEM_MOVEABLE Or GMEM_ZEROINIT, Len(DevMode))
lpDevMode = GlobalLock(PrintDlg.hDevMode)
If lpDevMode > 0 Then
CopyMemory ByVal lpDevMode, DevMode, Len(DevMode)
bReturn = GlobalUnlock(PrintDlg.hDevMode)
End If
'Set the current driver, device, and port name strings
With DevName
.wDriverOffset = 8
.wDeviceOffset = .wDriverOffset + 1 + Len(Printer.DriverName)
.wOutputOffset = .wDeviceOffset + 1 + Len(Printer.Port)
.wDefault = 0
End With
With Printer
DevName.extra = .DriverName & Chr(0) & .DeviceName & Chr(0) & .Port & Chr(0)
End With
'Allocate memory for the initial hDevName structure
'and copy the settings gathered above into this memory
PrintDlg.hDevNames = GlobalAlloc(GMEM_MOVEABLE Or GMEM_ZEROINIT, Len(DevName))
lpDevName = GlobalLock(PrintDlg.hDevNames)
If lpDevName > 0 Then
CopyMemory ByVal lpDevName, DevName, Len(DevName)
bReturn = GlobalUnlock(lpDevName)
End If
'Call the print dialog up and let the user make changes
If PrintDialog(PrintDlg) <> 0 Then
'First get the DevName structure.
lpDevName = GlobalLock(PrintDlg.hDevNames)
CopyMemory DevName, ByVal lpDevName, 45
bReturn = GlobalUnlock(lpDevName)
GlobalFree PrintDlg.hDevNames
'Next get the DevMode structure and set the printer
'properties appropriately
lpDevMode = GlobalLock(PrintDlg.hDevMode)
CopyMemory DevMode, ByVal lpDevMode, Len(DevMode)
bReturn = GlobalUnlock(PrintDlg.hDevMode)
GlobalFree PrintDlg.hDevMode
NewPrinterName = UCase$(Left(DevMode.dmDeviceName, InStr(DevMode.dmDeviceName, Chr$(0)) - 1))
If Printer.DeviceName <> NewPrinterName Then
For Each objPrinter In Printers
If UCase$(objPrinter.DeviceName) = NewPrinterName Then
Set Printer = objPrinter
'set printer toolbar name at this point
End If
Next
End If
On Error Resume Next
'Set printer object properties according to selections made
'by user
Printer.Copies = DevMode.dmCopies
Printer.Duplex = DevMode.dmDuplex
Printer.Orientation = DevMode.dmOrientation
Printer.PaperSize = DevMode.dmPaperSize
Printer.PrintQuality = DevMode.dmPrintQuality
Printer.ColorMode = DevMode.dmColor
Printer.PaperBin = DevMode.dmDefaultSource
On Error GoTo 0
MsgBox Printer.Copies
End If
End Sub
I added the msgbox at the end to display the copies property and it still doesnt return anything other then "1".
So even with my previous suggestion to create your own you will have to loop to print out multiple copies.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 11th, 2007, 02:21 PM
#16
Thread Starter
New Member
Re: Problem with Printing in Vista
To loop is not a problem.
But it has to be userfriendly.
Any suggestions?
-
Mar 11th, 2007, 02:26 PM
#17
Re: Problem with Printing in Vista
When you create your own dialog mimic the layout of the default built in one so the users wont be too confused.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 11th, 2007, 02:33 PM
#18
Thread Starter
New Member
Re: Problem with Printing in Vista
Hello again.
Just to clarify.
Yes, it still only returns 1. No matter the input.
Tried the code from FreevbCode.com, and it is a lot of code, and I have not even been able to get it to work.
What is needed is a fix that is as easy as possible for the user.
So the user can choose 2,3 or 4 or whatever he wants, and it is returned.
Anyone that knows?
-
Mar 11th, 2007, 02:35 PM
#19
Re: Problem with Printing in Vista
Like I already suggested, you need to create your own dialog. This is the only known way to work around the issue until its fixed by MS (if ever).
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 12th, 2007, 10:06 AM
#20
Thread Starter
New Member
Re: Problem with Printing in Vista
As Vb 6 is one of the most commonly used programming languages there are, I am certain there hava to be a better solution then creating your own dialog.
Someone how knows?
-
Mar 12th, 2007, 10:27 AM
#21
Re: Problem with Printing in Vista
Without being able to fix the bug in Ms' control it makes it difficult to say the least.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 12th, 2007, 02:28 PM
#22
Re: Problem with Printing in Vista
RobDog, here is the code I've been using for Copy looping:
Code:
CommonDialog1.Flags = &H100000 Or &H4&
CommonDialog1.ShowPrinter
NumCopies = CommonDialog1.Copies
For I=1 TO NumCopies
'Print Something
Next
I believe what you are saying is that Vista ignores whatever the command dialog box returns and sets it to 1.
What about allowing the user to set the number of copies before the Command Dialog box appears? Then, suppress the option to change the number of copies. Is that feasible?
-
Mar 12th, 2007, 03:12 PM
#23
Re: Problem with Printing in Vista
Yes, that is feasible and something along the lines of what I have suggested several times in this thread but no one listens. The cdl .Copies property does not work at all in Vista. So either you manually create your own dialog or you code in the copies from some other control or just hard code it depending on your needs.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 13th, 2007, 04:08 AM
#24
Thread Starter
New Member
Re: Problem with Printing in Vista
Well.
As the one that started this thread lets try to get this right.
That you can work around it by a selfcreated loop is obvious for everyone. I have of course known that all the time, and would not have asked the question because of that.
You can create a textbox, let the user tell how many copies he wants, and then use that input to decide how many copies to print.
That is quite obvious, but was by no means the reason I asked the question.
I LOOK FOR A SENSIBLE SOLUTION!
A real solution!
The ones suggested here don't sound like that at all. Sounds like a homemaid solution, not a proffessional one.
So if you don't know a solution, that's fine, please then don't answer. And from the ones that have answered until now, it is obvious that no one knows.
BUT IF YOU KNOW PLEASE LET ME KNOW.
Microsoft tells the following:
The Visual Basic team is committed to “It Just Works” compatibility for Visual Basic 6.0 applications on Windows® Vista™. The Visual Basic team’s goal is that Visual Basic 6.0 applications that run on Windows XP will also run on Windows Vista.
So it should work, but it doesn't.
As said, there is no point using time, with a discusion like the one above.
But if you know a real and proffessional solution, please tell!
-
Mar 13th, 2007, 04:35 AM
#25
Re: Problem with Printing in Vista
We do know. Its not supported under Vista as shown by the link where its listed under the "Tested but not shipping" section as it still needs a fix which MS has not yet done. If you dont want to believe those of us that have tested and explained this to you then perhaps you should call Microsoft and create a support incident as you obviously do not believe me or others.
Just because you look for a solution does not mean that there is one. Even the one where you would have to create your own print dialog window/form would be the best professional solution but still its not acceptable to you. Sorry but I'm not wasting anymore time on this thread.
Later
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|