Solved

PrintDialog Issue

Posted on 2013-01-09
2
417 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

730 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