Close TaskDialog or Hide Buttons |
Post Reply |
Author | |
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
Posted: 30 March 2009 at 11:29pm |
I'm really desperate for a way to either:
A) Close the TaskDialog menu without clicking a button, or B) Hide a button on the TaskDialog so I can close it with ClickButton (but the user cannot see it or click it). The reason for this is that I have a marquee style progress bar moving with a separate thread doing background processing. The user has the option to click the Cancel button, but I would also like the ability to close the TaskDialog in code when the thread is finished processing (without clicking the Cancel button in code). Any chance at all of either (or both) of these in the next release? |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, Why you can't call
TaskDialog1.ClickButton xtpTaskButtonCancel and set some flag variable that you close it manually? :)
But anyway you are right, we need some Close method.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
You're right that I could do it this way (and I may have to for now). I was hoping to avoid this, because I am already tracking a somewhat complex state machine in the TaskDialog timer event, and adding extra variables would just add to the code complication...
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Hi Oleg,
Sorry for being a pest, but is there any chance this feature (close TaskDialog) could make it into an early build (or at least the next release)? |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Hi Oleg,
I'm back to this one as I've found I need the ability to close the TaskDialog by code without showing a button again. Any chance of this? Or could you expose the Hwnd and maybe SendMessage(WM_CLOSE) or CloseWindow would work? Thanks. |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Ok, I've been able to get the Hwnd of the dialog by calling FindWindow in the Constructed event. Unfortunately, I haven't been able to close it. I've tried:
SendMessage(WM_CLOSE) <this get consumed because I also need AllowCancellation = False DestroyWindow() <Dialog disappears, but does not release itself so the app gets stuck. Any ideas what I could call to close the window now that I have the hwnd? Thanks. |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Got it...If I set .AllowCancellation = True immediately before I call SendMessage(WM_CLOSE), then I can close the window.
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
I think I've solved most of the problems that I was having. If anyone else is interested, then here's some demo code:
https://forum.codejock.com/forum_posts.asp?TID=14843 |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
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 |