Solved

PrintDialog Issue

Posted on 2013-01-09
2
416 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

831 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