-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Pandurang_Nayak
Message 4 in Discussion


 
Since you appear to be familiar with 
printing in VB 6.0, I fished out this MSDN article on what has changed with 
regard to printing in VB.NET:
 
Hope this helps.
 
Pandurang.
 

Printer 
Object Changes in Visual Basic .NET
The Printer object in Visual Basic 
6.0 is replaced by the PrintDocument component in Visual Basic .NET. The 
behavior is different, but in most cases the functionality can be 
duplicated.


The following tables list Visual Basic 6.0 properties, methods, and events 
and their Visual Basic .NET equivalents. Where there are no direct equivalents, 
links are provided to additional information. Unless otherwise noted, all 
objects are in the System.Drawing namespace.

Printer Properties


  
  
    Visual Basic 6.0
    Visual Basic .NET Equivalent
  
    ColorMode
    No longer necessary. This property controlled whether 
      output would be printed in monochrome on a color printer; it is now up to 
      the printer to expose this as an advanced option. The SupportsColor 
      property of the PrinterSettings class can be used to determine the 
      color capabilities of a printer.
  
    Copies
    Copies property of the PrinterSettings 
    class.
  
    CurrentX
    No equivalent. Replaced by location and dimension 
      arguments of various methods of the Graphics class.
  
    CurrentY
    No equivalent. Replaced by location and dimension 
      arguments of various methods of the Graphics class.
  
    DeviceName
    PrinterName property of the PrinterSettings 
      class.
  
    DrawMode
    No equivalent. For details, see Graphics 
      Changes in Visual Basic .NET.
  
    DrawStyle
    No equivalent. For details, see Graphics 
      Changes in Visual Basic .NET.
  
    DrawWidth
    No equivalent. For details, see Graphics 
      Changes in Visual Basic .NET.
  
    DriverName
    No equivalent. No longer needed; printer drivers are 
      managed by Windows.
  
    Duplex
    Duplex property of the PrinterSettings 
    class.
  
    FillColor
    No equivalent. For details, see Graphics 
      Changes in Visual Basic .NET.
  
    FillStyle
    No equivalent. For details, see Graphics 
      Changes in Visual Basic .NET.
  
    Font
    No equivalent. For details, see Font 
      Changes in Visual Basic .NET.
  
    FontBold
    No equivalent. For details, see Font 
      Changes in Visual Basic .NET.
  
    FontCount
    No equivalent. For details, see Font 
      Changes in Visual Basic .NET.
  
    FontItalic
    No equivalent. For details, see Font 
      Changes in Visual Basic .NET.
  
    FontName
    No equivalent. For details, see Font 
      Changes in Visual Basic .NET.
  
    Fonts
    No equivalent. For details, see Font 
      Changes in Visual Basic .NET.
  
    FontSize
    No equivalent. For details, see Font 
      Changes in Visual Basic .NET.
  
    FontStrikeThru
    No equivalent. For details, see Font 
      Changes in Visual Basic .NET.
  
    FontTransparent
    No equivalent. For details, see Font 
      Changes in Visual Basic .NET.
  
    FontUnderline
    No equivalent. For details, see Font 
      Changes in Visual Basic .NET.
  
    ForeColor
    No equivalent. For details, see Color 
      Behavior Changes in Visual Basic .NET.
  
    hDC
    No longer necessary. An instance of a PrintDocument 
      component is the equivalent of a device context. 
      Note   Graphics 
        objects have GetHDC and ReleaseHDC methods that can be 
        used in advanced scenarios.
  
    Height
    PaperSize property of the PageSettings 
    class.
  
    Orientation
    Landscape property of the PageSettings 
    class.
  
    Page
    No equivalent. The current page number is not tracked; 
      however, you can easily do this by setting a variable in the 
      BeginPrint event and incrementing it in the PrintPage 
    event.
  
    PaperBin
    PaperSources property of the PrinterSettings 
      class.
  
    PaperSize
    PaperSize property of the PageSettings 
    class.
  
    Port
    No longer necessary. The PrintPreviewDialog control 
      automatically sets port information.
  
    PrintQuality
    PrinterResolutions property of the 
      PrinterSettings class.
  
    RightToLeft
    No longer necessary. The direction of printing is 
      controlled by the localization settings in Windows.
  
    ScaleHeight
    No equivalent. For details, see Coordinate 
      System Changes in Visual Basic .NET.
  
    ScaleLeft
    No equivalent. For details, see Coordinate 
      System Changes in Visual Basic .NET.
  
    ScaleMode
    No equivalent. For details, see Coordinate 
      System Changes in Visual Basic .NET.
  
    ScaleTop
    No equivalent. For details, see Coordinate 
      System Changes in Visual Basic .NET.
  
    ScaleWidth
    No equivalent. For details, see Coordinate 
      System Changes in Visual Basic .NET.
  
    TrackDefault
    No direct equivalent. The IsDefaultPrinter property 
      of the PrinterSettings class can be used to determine if a printer 
      is the default, but printing is no longer halted if the default printer 
      changes.
  
    TwipsPerPixelX
    No longer necessary. Measurements in Visual Basic .NET are 
      always in pixels.
  
    TwipsPerPixelY
    No longer necessary. Measurements in Visual Basic .NET are 
      always in pixels.
  
    Width
    PaperSize property of the PageSettings 
    class.
  
    Zoom
    No longer necessary. If the printer has zoom capabilities, 
      settings are automatically exposed in the Print dialog 
box.

Printer Methods


  
  
    Visual Basic 6.0
    Visual Basic .NET Equivalent
  
    Circle
    Graphics.DrawEllipse
  
    EndDoc
    Print
  
    KillDoc
    PrintEventArgs.Cancel
  
    Line
    Graphics.DrawLine
  
    NewPage
    PrintPageEventArgs.HasMorePages
  
    PaintPicture
    Graphics.DrawImage
  
    PSet
    Graphics.DrawLine
  
    Scale
    No equivalent. For details, see Coordinate 
      System Changes in Visual Basic .NET.
  
    ScaleX
    No equivalent. For details, see Coordinate 
      System Changes in Visual Basic .NET.
  
    ScaleY
    No equivalent. For details, see Coordinate 
      System Changes in Visual Basic .NET.
  
    TextHeight
    Font parameter of Graphics.DrawString
  
    TextWidth
    Font parameter of 
  Graphics.DrawString
 
 

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDOTNET/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to