Results 1 to 2 of 2

Thread: combobox to print preview question

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2006
    Posts
    26

    combobox to print preview question

    i am having trouble creating a command which will allow me to will display a print preview of all or individually selected items in my combo box. the only thing i get when i run the program is a blank print preview with nothing on it from the combo box. could someone please get me on the right road?? this is what my code looks like in my form:


    Private Sub PrintSubjectsToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintSubjectsToolStripMenuItem1.Click

    'begin the process for print the subject items.

    With Me
    If .subjectComboBox.SelectedIndex = -1 Then
    'select (none) if nothing selected.
    .subjectComboBox.SelectedIndex = 0

    End If
    If .subjectComboBox.SelectedIndex <> -1 Then
    ' items selected.
    .PrintPreviewDialog1.Document = PrintDocument1
    PrintPreviewDialog1.ShowDialog()


    Else
    'no item selected
    MessageBox.Show("select a item from the book list", _
    "print selection", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)

    End If

    End With

    End Sub
    Last edited by huey; Feb 7th, 2007 at 01:00 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width