Solved

PrintDialog Issue

Posted on 2013-01-09
2
413 Views
Last Modified: 2013-01-09
So I have this simple piece of code that I have used many times but for some reason has stopped working. I recently upgraded my project from a VS 2008 solution to VS 2010 solution.

The issue is it just passes over the showdialog. The printdialog never comes up

Dim LabelPrint As New PrintDialog()

        Cursor.Current = Cursors.WaitCursor

        Dim result As DialogResult

        If Label_Printer = "" Then
            result = LabelPrint.ShowDialog()

            If (result = DialogResult.OK) Then
                Label_Printer = LabelPrint.PrinterSettings.PrinterName
            Else
                Exit Sub
            End If
        Else
            LabelPrint.PrinterSettings.PrinterName = Label_Printer
        End If

Open in new window

0
Comment
Question by:aothomas42
  • 2
2 Comments
 

Accepted Solution

by:
aothomas42 earned 0 total points
ID: 38761121
found my issue on another site

The PrintDialog class may not work on AMD64(x64 or Any CPU is belong to AMD64 technical, including intel x64cpu) microprocessors unless you set the UseEXDialog property to true.

This is a known issue.

And this limitation has been supported in .net framework4, so if you want use this class with windows7 style dialog, then you will need to use .net framework4, otherwise you will need to use the xp style dialog with set the UseEXDialog property to true, or using x86 target platform.

Switched my solution to Framework 4 and everything worked
0
 

Author Closing Comment

by:aothomas42
ID: 38761122
Found this solution on another site
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now