Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

PrintDialog Issue

Posted on 2013-01-09
2
Medium Priority
?
420 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

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

604 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