TaskDialog close
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=11219
Printed Date: 21 November 2024 at 8:54pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: TaskDialog close
Posted By: chrisABC
Subject: TaskDialog close
Date Posted: 26 June 2008 at 7:20pm
Using the TaskDialog with VB6, WinXP
When I click on a hyperlink, the _HyperlinkClicked event is triggered, but the dialog doesn't close.
How can I get it to close?
(It closes when a button is clicked).
------------- Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6
|
Replies:
Posted By: ijwelch
Date Posted: 26 June 2008 at 8:26pm
Try this:
taskDialog.ClickButton xtpTaskButtonCancel
The parameter is the ID of the button you want to simulate clicking so change this to whichever button gives the result you want.
|
Posted By: chrisABC
Date Posted: 27 June 2008 at 5:44am
Thanks for the fast reply. This works but only if I know the ID of a suitable button.
I am hoping for a general option that can be used in all cases.
I tried .ClickButton 0
hoping that this would click the default or first button. But this seems to do nothing for a while, andf then when I close the Dialog I get VB error message "Out of Stack Space". So I stopped trying button zero <grin>
So as a workaround, is it possible to obtain the ID of a button from a Dialog that is already shown?
------------- Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6
|
Posted By: ijwelch
Date Posted: 27 June 2008 at 9:13pm
Try using the DefaultButton property.
Also, you can use the CommonButtons property to determine what standard buttons are available. This can be any combination of these buttons:
xtpTaskButtonOk |
OK Push Button. |
xtpTaskButtonYes |
Yes Push Button. |
xtpTaskButtonNo |
No Push Button. |
xtpTaskButtonCancel |
Cancel Push Button. |
xtpTaskButtonRetry |
Retry Push Button. |
xtpTaskButtonClose |
Close Push Button. |
It doesn't look like there's any way to retrieve the IDs of any existing custom buttons.
|
|