home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / mswindo / programm / misc / 4425 < prev    next >
Encoding:
Text File  |  1992-12-22  |  2.7 KB  |  63 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!howland.reston.ans.net!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!sunic!seunet!enea!tope
  3. From: tope@enea.se (Tommy Petersson)
  4. Subject: Re: VB, Windows and printing
  5. Message-ID: <1992Dec22.171145.21177@enea.se>
  6. Organization: Enea Data AB
  7. X-Newsreader: Tin 1.1 PL3
  8. References: <1992Dec21.132516.21464@enea.se>
  9. Date: Tue, 22 Dec 1992 17:11:45 GMT
  10. Lines: 51
  11.  
  12. tope@enea.se (Tommy Petersson) writes:
  13. : We are doing a small application in Visual Basic 2.0 Pro, to run on
  14. : Windows 3.1 clients in a Lan Manager Network.
  15. : Reports from our application need to be printed in landscape orientation
  16. : on a Nec PostScript laser printer. This is easy by selecting landscape
  17. : mode in Control Panel/Printer. However, everything else the users print
  18. : should be portrait, and they of course don't want to manually change the
  19. : preferences all the time.
  20. : There seem to be two choices here:
  21. : Let Visual Basic still use the "Printer" object, (which only works on
  22. : the default printer). For every report in our application, set the printer
  23. : to landscape, and reset it afterwards.
  24. : Forget about the Printer object, stuff the default printer, use Windows
  25. : calls to get/change device context and don't mess with the default printer
  26. : whatsoever.
  27. : Which is best? Or is there a better way of doing it?
  28. : In "your best solution" - how do you do it? (I have looked only briefly
  29. : on the GetDeviceContext, ExtDeviceMode, Escape and other calls)
  30. : Pro's and con's?
  31. : -- 
  32. : =============================================================================
  33. :  Tommy Petersson              tope@enea.se              Enea Data AB, Sweden
  34. : =============================================================================
  35.  
  36. Microsoft Support recommended me to use the Escape call, and sent me an
  37. example. This example initially states that you shouldn't use Escape but
  38. DeviceCapabilities/ExtDeviceMode instead...:-)
  39.  
  40. ExtDeviceMode and many other functions are not listed in the "Win 3.1 API Help"
  41. file. MS Support didn't know this, and couldn't give any explanation. They
  42. however had the same guess, that it may be problematic to implement them.
  43. Maybe it's because of a problem to pass a parameter that is an address to
  44. a structure containing a C string?
  45.  
  46. If anyone's interested: I found out that ResetDC can change paper
  47. orientation during printing of a document, not only between documents as
  48. with Escape. It's however not listed in "Win 3.1 API Help" either.
  49.  
  50. -- 
  51. =============================================================================
  52.  Tommy Petersson              tope@enea.se              Enea Data AB, Sweden
  53. =============================================================================
  54.  
  55.