-
December 6th, 2010, 08:39 AM
#1
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
-
December 13th, 2010, 03:57 PM
#2
Re: printDialog focus problem
mhmm, not sure but EndInvoke might be the key and the IAsyncResult
win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming
remeber to give feedback you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation
private lessons are not an option so please don't ask for help in private, I won't replay
if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know
-
December 13th, 2010, 04:26 PM
#3
Re: printDialog focus problem
Question; why are you launching a dialog that is supposed to be modal asynchronously?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|