printDialog focus problem
I am trying to use PrintDialog with the Toolbar button and not able to have the focus on the print button though I can see the printdialog window as active window. I tried the following code to get the focus of the print button.
ShowThePrintDialog printD = new ShowThePrintDialog(p.ShowDialog);
this.BeginInvoke(printD);
This gives me the focus on the print button and I can click the button for the first time only.
BUT my problem is I want to capture the DialogResult to capture the OK or Cancel button.
I am not able to do so.
Can anybody know how to do it? A sample code will be really appreciated.
I tried already with the other alternatives but I need BeginInvoke only to get the focus on the print button.
Raman
Re: printDialog focus problem
mhmm, not sure but EndInvoke might be the key and the IAsyncResult
Re: printDialog focus problem
Question; why are you launching a dialog that is supposed to be modal asynchronously?