INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Visual Basic (Microsoft) Versions 5/6 FAQ

What VB shoud be able to do!

Printer Select Dialog Form -- Part 4 by CassandraR
Posted: 9 Oct 03

Save as clsPrintSelec.cls

VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsPrintSelect"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
'
'----------------------------------------------------------------------------------------
'   INTERNAL GENERAL VARIABLES
'----------------------------------------------------------------------------------------
'
Private m_intErrorNumber As Integer     ' Storage for Error Number
Private m_strErrorDescr As String       ' Storage for Error Description string
'
Private m_prtSelectedPrinter As Printer ' Printer that the user has selected.
Private m_intPaperSize As Integer       ' Selected papersize from dialog box.
Private m_intPaperSource As Integer     ' Selected papersource from dialog box.
'

'
'----------------------------------------------------------------------------------------
'   PROPERTY ROUTINES
'----------------------------------------------------------------------------------------
'
Friend Property Set SelectedPrinter(ByRef prtNewPrinter As Printer)
    If IsNull(prtNewPrinter) Then Exit Property
    If prtNewPrinter Is Nothing Then Exit Property
    Set m_prtSelectedPrinter = prtNewPrinter
End Property
'
'----------------------------------------------------------------------------------------
'

Public Property Get PrinterSelected() As Object ' Printer
    Set PrinterSelected = m_prtSelectedPrinter
End Property
'
'----------------------------------------------------------------------------------------
'

'
'----------------------------------------------------------------------------------------
'   PUBLIC INTEFACE ROUTINES
'----------------------------------------------------------------------------------------
'
Public Sub PrinterSelect()
    frmPrinterSelect.Show vbModal
    Set m_prtSelectedPrinter = frmPrinterSelect.SelectedPrinter
End Sub
'
' ---------------------------------------------------------------------------------------
'

'
'----------------------------------------------------------------------------------------
'   INTERNAL ROUTINES
'----------------------------------------------------------------------------------------
'
Private Sub Class_Initialize()
        Set frmPrinterSelect.PrintSelectCls = Me
End Sub
'
' ---------------------------------------------------------------------------------------
'

End of clsPrintSelec.cls

Back to Visual Basic (Microsoft) Versions 5/6 FAQ Index
Back to Visual Basic (Microsoft) Versions 5/6 Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close