TaskDialog close |
Post Reply |
Author | ||||||||||||
chrisABC
Senior Member Joined: 05 June 2008 Status: Offline Points: 258 |
Post Options
Thanks(0)
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
|
||||||||||||
ijwelch
Senior Member Joined: 20 June 2006 Status: Offline Points: 262 |
Post Options
Thanks(0)
|
|||||||||||
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. |
||||||||||||
chrisABC
Senior Member Joined: 05 June 2008 Status: Offline Points: 258 |
Post Options
Thanks(0)
|
|||||||||||
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
|
||||||||||||
ijwelch
Senior Member Joined: 20 June 2006 Status: Offline Points: 262 |
Post Options
Thanks(0)
|
|||||||||||
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:
It doesn't look like there's any way to retrieve the IDs of any existing custom buttons. |
||||||||||||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |