Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7736275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:42:06+00:00 2026-06-01T07:42:06+00:00

This is very odd. I have never had this issue with ShowDialog in C#.

  • 0

This is very odd. I have never had this issue with ShowDialog in C#. For some odd reason when the code developed for 64bit OS tries to show the Printer Dialog it never does it and the DialogResult is “None”. I have debugged it by stepping thru each line and see no clues. I’ve checked the namespace and verified that I set proper references:

using System.IO;
using System.Windows.Forms;

Here’s the code:

    private void printToolStripMenuItem_Click(object sender, EventArgs e)
    {
        printDoc.DefaultPageSettings = pgSettings;
        PrintDialog dlg = new PrintDialog();
        dlg.Document = printDoc;
        if (dlg.ShowDialog() == DialogResult.OK)
        {
            printDoc.Print();
        }
    }

The exact same code, in an almost identical version for 32 bit machines, has no problem. The dialog is displayed, the user selects a printer, presses OK and the task is complete.

In the 64bit version, the ShowDialog() will not work for PrintDialog() but will work for PrintPreviewDialog()!

Any ideas would be greatly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:42:07+00:00Added an answer on June 1, 2026 at 7:42 am

    I think this has been answered elsewhere:

    http://social.msdn.microsoft.com/Forums/en-US/netfx64bit/thread/a707d202-1a8b-43b1-9fff-08aa7ceb200a/

    Try setting USEExDialog = True – It should work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very odd issue trying to run this quite simple C program
I have having a very odd issue when utilizing this UIAlertView. When viewing a
Right, this is a very odd issue that I'm wondering how i am going
Does the code below smell? I'm refactoring some code and have discovered this circular
This is my first question on S.O. I have a very odd problem. Below
I'm having this very odd issue while trying to serialize a class for logging
Ok, so this is very odd. I have a site that I am breaking
I have a very odd performance issue with an SSIS package in Sql Server
I'm actually translating some C++ code (which I know very little about, and have
I have come across a very odd problem in C that I have never

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.