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