Prev: EjectNtmsMedia
Next: MSCOMM and Binary
From: Helge Haensel on 9 Aug 2006 11:24 Am 09.08.2006, 16:23 Uhr, schrieb Mike Williams <mike(a)WhiskyAndCoke.com>: > "Helge Haensel" <dj1wm(a)nurfuerspam.de> wrote in message > news:op.td0kkglbsjedh2(a)hhh... > >> Hi, Mike, problems, problems >> Sorry, i am a little bit stressed. >> A history of actions taken (08.08.2006): >> Installed vb5sp3.exe. >> Replaced code here with yours newly supplied one. No diff's at >> all. Started code, dialogbox came up, print directed to PDF, seemed >> to work. But A-Reader didnt open! Checked pdf-printer queue, >> found 1 job, no kill, delete, restart possible. > > Well actually that *is different* from your original problem. If you > remember, your original problem was that when using the VB printer Absolutely correct. I agree, but that is where i am sticking around in the moment. > object to > print to a HP printer using CommonDialog Showprinter the orientation did > not > work. That's standard behaviour in WinXP. It happens because the only > built > in method the VB printer object has of finding out what choices the user > made in the CommonDialog is to look at the new settings of the default > printer (which by default the CommonDialog attempts to change). That > method > used to work in Win98, but it does not work in XP because although XP > allows > the CommonDialog to change the default printer it does not allow it to > change any of its default properties, such as orientation or anything > else. > That is why when using the VB printer object you need to use a different > method other than the standard CommonDialog control, and that is why you > need to use the code I posted, or something similar. Correct of course. But the code doesnt work here. > > Your current reported behaviour also *is different* from your secondary > problem, in which the printer completely ignored the PDF995 choice and > instead printed to the default printer. That problem was caused by a bug > in > the VB printer object, and the VB5 service pack 3 fixed that problem for > you > because the VB printer object now *does* send its output to the chosen > PDF995 driver. It does that now. > > So, the problem you currently have is a *new problem*, and it is probably > nothing at all to do with the code you are using or with VB itself. It is > most likely a problem with your PDF995 driver itself or some of the > system > settings it is using. What you need to do right now is to "split the > problem > up into two possible halves" and see which half is actually causing the > trouble. So, the very first thing you should do is to open the Windows > Control Panel printer applet and right click the PDF995 driver and select > "Set as Default Printer". When you have done that, try a simple: Did that. > > Printer.Print > Printer.Print "This is a test" > Printer.EndDoc Did that. Job in pdf-queue came up (~20kb), status: printing. Nothing else happens. > > Also (again after setting the PDF995 driver as the system default > printer) > create a fresh MS Word document (or NotePad document or whatever) and > type > just a few words into it and then print it, just clicking OK on the > MSWord > print dialog without altering any settings. Did it, used notepad, Save as Dialog comes on, asking for location to store, name is preset to 'Microsoft Visual Basic.PDF' ! , folder selected by system is 'CV:\Programme\pdf995', OK. No *.PDF-file in that folder. Searching for that file gives as only result a 'microsoft visual basic.pdf.lnk' in the Recent-Folder. The job in queue deleted itself. (I do not use the very tricky XP-search utility, i use a programme from Agent Ransack. It works perfectly with wildcards, shows hidden files, nothing is excluded and is extremly fast. Recommended.) > > Post back with the result of both of those actions. > >> BTW: vb5sp3.exe created a C:\DevStudio\VS7_SP3-folder >> with ~36 MB of contents.I think i can delete that one. OK? > > Yep. You can delete that folder. The service pack contains service > components for all parts of the Visual Studio setup, and only a small > part > of it is actually used for the VB5 update. You do of course need to run > the > Setup.exe file which is inside that folder, but once you have done so you > can delete the entire folder. Then, just to make sure, open up VB5 and > use > the menu Help / About and it should show you (in brackets after the > Visual > Basic name) what service pack is installed. I would suggest that you > hang on > to the original compressed vbsp3 (or vb5sp3) file though, just in case > you > need it again in the future. Sure! Of course, will do. > > Anyway, use the Control Panel printer applet to set your Windows default > printer to PDF995 and then try the two small tests I have suggested and > post > back with detailed results Thanks for your assistance. Helge > > Mike Williams (MVP - Visual Basic) >
From: J French on 9 Aug 2006 11:40 On Wed, 9 Aug 2006 15:23:10 +0100, "Mike Williams" <mike(a)WhiskyAndCoke.com> wrote: <snip> >Mike Williams (MVP - Visual Basic) MVP - well you deserve it.
From: Mike Williams on 9 Aug 2006 12:36 J French wrote: > MVP - well you deserve it. Thank you. Mike
From: Mike Williams on 9 Aug 2006 16:15 "Helge Haensel" <dj1wm(a)nurfuerspam.de> wrote in message news:op.td0vqxw0sjedh2(a)hhh... > Correct of course. But the code doesnt work here. Yes it does. The code allows you to print to a printer other than the Windows default printer, and it also allows you to print at whatever orientation you want. The problem you are having is with a *specific printer*, and it is almost certainly a driver problem. Try that code when printing to something other than the PDF995 driver (which appears to be faulty on your system) and you'll find that it works. > Did it, used notepad, Save as Dialog comes on, asking for > location to store, name is preset to 'Microsoft Visual > Basic.PDF' ! , folder selected by system is 'CV:\Programme > \pdf995', OK. No *.PDF-file in that folder. So, as I thought would happen, you've established that the PDF995 printer driver does not work properly with Notepad either, which is exactly what I suspected! You need to stop worrying about finding a "VB problem" and instead look for a solution to the real problem, which is almost certainly either the PDF995 driver or something associated with it. Before you go any further try setting your Windows default printer to a specific printer (your fax driver, for example) and then use the code I posted to print something to a different printer (your HP printer for example). That should work okay, and it should also allow you to print at whatever orientation you wish. Then check your Windows default printer again. It should have left it unchanged. Then take it from there. Mike Williams (MVP - Visual Basic)
From: Helge Haensel on 10 Aug 2006 05:19
Am 09.08.2006, 22:15 Uhr, schrieb Mike Williams <Mike(a)WhiskyAndCoke.com>: > "Helge Haensel" <dj1wm(a)nurfuerspam.de> wrote in message > news:op.td0vqxw0sjedh2(a)hhh... > >> Correct of course. But the code doesnt work here. > > Yes it does. The code allows you to print to a printer other than the > Windows default printer, and it also allows you to print at whatever > orientation you want. The problem you are having is with a *specific > printer*, and it is almost certainly a driver problem. Try that code > when printing to something other than the PDF995 driver (which appears > to be faulty on your system) and you'll find that it works. Sorry, yes it does. > >> Did it, used notepad, Save as Dialog comes on, asking for >> location to store, name is preset to 'Microsoft Visual >> Basic.PDF' ! , folder selected by system is 'CV:\Programme >> \pdf995', OK. No *.PDF-file in that folder. > > So, as I thought would happen, you've established that the PDF995 > printer driver does not work properly with Notepad either, which is > exactly what I suspected! You need to stop worrying about finding a "VB > problem" and instead look for a solution to the real problem, which is > almost certainly either the PDF995 driver or something associated with > it. Please remember, in a previous msg i wrote: I HAVE A PROBLEM > > Before you go any further try setting your Windows default printer to a > specific printer (your fax driver, for example) and then use the code I > posted to print something to a different printer (your HP printer for > example). That should work okay, and it should also allow you to print > at whatever orientation you wish. Then check your Windows default > printer again. It should have left it unchanged. Then take it from there. > Did it. You are right. I will try to fix my problem with the PDF995-driver now. I probably will have to make a system restore. I will come up with an other post when i fixed the driver and other problems still need help. So let us break this thread here. Thank you for providing the code and of course your detailed help instructions and advices. Helge > Mike Williams (MVP - Visual Basic) > > > |