PrintDialog.UseEXDialog problem

  • Thread starter Thread starter Jean Paul Mertens
  • Start date Start date
J

Jean Paul Mertens

Hello All,

If I use -
ContractPrintDialog.UseEXDialog = true;

- My dialog does not get focus after showing thus having a caption (dark
bleu) of the active window, I always have to click on the dialog before I
can type or before a button responds.

When I do not use the extended dialog I do not have this problem.

Is there a work around or so.

Greets

Jean Paul

www.on7ami.be
 
Hi Jean,

Thank you for posting.

This is a quick note to let you know that I am performing research on this
issue and will get back to you as soon as possible. I appreciate your
patience.


Sincerely,
Linda Liu
Microsoft Online Community Support

====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================
 
Hi Jean,

Based on your description, I had a test on the PrintDialog. I set the
UseEXDialog property of the PrintDialog to true and show the dialog, the
dialog did get focus. The following code is picked out of my test project.

private void button1_Click(object sender, EventArgs e)
{
this.printDialog1.UseEXDialog = true;
this.printDialog1.ShowDialog();
}
Is there any difference between your code and mine?

If you have any concerns or need anything else, please don't hesitate to
let me know.


Sincerely,
Linda Liu
Microsoft Online Community Support

====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================
 
Hey Linda,

Hereby the code from the program (It's a part of a switch statement):

case CL_ToolStrip.Buttons.Print:

// Indien nog geen contractnummer, eerst een contractnummer geven

myHuurContract.save();

if (myHuurContract.ContractNr == 0)

{

myHuurContract.GradeUpToContract();

}

dirty = false;

// Afdrukken

ContractPrintDialog = new PrintDialog();

ContractPrintDoc = new PrintDocument();

ContractPrintDoc.DocumentName = "Verhuurcontract";

ContractPrintDoc.PrintPage += new
PrintPageEventHandler(this.ContractPrintDoc_PrintPage);

ContractPrintDoc.BeginPrint += new
PrintEventHandler(this.ContractPrintDoc_BeginPrint);

ContractPrintDialog.UseEXDialog = true;

GetPrinterSettings(ContractPrintDialog.PrinterSettings); // Gets the
previously saved printersettings

myPrint = ContractPrintDialog.ShowDialog();

if (myPrint == DialogResult.OK)

{

ContractPrintDoc.PrinterSettings =
ContractPrintDialog.PrinterSettings;

ContractPrintDoc.Print();

SetPrinterSettings(ContractPrintDoc.PrinterSettings); // Saves
the used printersettings

}

break;

From the moment the printerdialog is popped up you have the impression that
he has the focus (darkbleu border and window title, default button 'Print'
accebnntuated, default printer selected bleu etc...) but when you click a
button or select another printer the dialog does not respond. Only if I
click a second time, there is a predicted response to the last click.

If I first click on the background of the dialog then also the dialog
responds normal.

I use XP-Style settings so if I move my mouse over the buttons without first
clicking somewhere on the dialog, the button borders, who normaly become a
bit yellow, are not reacting. Once somthing is clicket they react normal.

If I just comment out the use of the ExDialog and use the small printer
dialog everything works fine.

Perhaps this makes somthings clearer to you,

Greets

Jean Paul
 
Hi Jean,

Thank you for your reply and your detailed description on your problem.

I still can't reproduce the problem you have. After I set the UseExDialog
of the PrintDialog to true and show it, the dialog gets focus and can react
on my operations on it. If possible, would you please set up a simple
project which could just reproduce the problem and send it to me? To get my
actual email, please remove the "online" from my displayed email address.

Thanks.


Sincerely,
Linda Liu
Microsoft Online Community Support

====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================
 
Back
Top