Need help with printDialog

Smurf

New member
Joined
Aug 24, 2005
Messages
4
Programming Experience
1-3
I am currently busy with an application that should print graphics. The application has a printpreveiw, that uses the printpreviewdialog and works perfectly, and a print, which uses a printdialog. This is where my trouble starts.

After starting the application, if i show the printdialog first, the dialog comes up, but all the labels and button labels are empty. This continues until i show the printpreviewdialog. After that, my printdialog displays fine.
 
Problem with printDialog

Hi. Here is the code that shows the ppdb and the pdb. It is called during a menu call.

Private Sub mnuPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuPrint.Click
Dim result As Integer
cnt.clear() // Just a counter object I use
printDialog.Document = print
result = printDialog.ShowDialog()
If result = DialogResult.OK Then
print.Print()
End If
End Sub

Private Sub mnuPrintPreview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuPrintPreview.Click
cnt.clear() // Just a counter object I use
printPreviewDialog.Document = print
printPreviewDialog.WindowState = FormWindowState.Maximized
printPreviewDialog.ShowDialog()
End Sub

An image of the printDialog as it shows incorrectly is also attached. Please take a look at it.

The printDialog functions properly, but the labels is missing. If you click on the properties button or the cancel button, everything works fine.

I need help urgently. My deadline is due on Tuesday. I'll apperciate any help or suggestions i can get.

Thanx
 

Attachments

  • printDialog.JPG
    printDialog.JPG
    18.3 KB · Views: 121
PrintDialog

Thanx.

I'll look out for a reply. I keep on trying on my side to.

I downloaded example code that did the same thing. So it might be something other than my code

I'll attatch the sample

Plz let me know what you find.
 

Attachments

  • printDialog.JPG
    printDialog.JPG
    20.2 KB · Views: 107
  • PrintingDemo.zip
    7.5 KB · Views: 35
I tried the example you posted. It doesnt work either. The page setup dialog is also without labels.

So, whats wrong. Can you give me any ideas, plz.
 
Back
Top