Print Page | Close Window

VistaTaskDialog?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Active-X COM Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=8023
Printed Date: 28 November 2024 at 12:59am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: VistaTaskDialog?
Posted By: cmm2006
Subject: VistaTaskDialog?
Date Posted: 15 September 2007 at 6:37pm
Hello,
I am so happy to see vistataskdialog finally with suite pro. now, I was checking the sample, and I love it, but I was wondering about how to have a taskdialog just like "Dialog6" (sample tab). do I have to use XML file in order to have the same dialog, or is there any easy way to do it?
thank you,
Note: Codejock developer, keep the good work



Replies:
Posted By: dentor
Date Posted: 16 September 2007 at 3:48am
Hello cmm2006,
 
I translate the 'dialog6' in code:
 
Private Sub Dialog006_Click()
    With TaskDialog
        .Reset
        .CommonButtons = 0
        .AllowCancellation = True
        .EnableHyperlinks = True
        .WindowTitle = "Microsoft Windows"
        .MainInstructionText = "Your computer is almost out of virtual memory"
        .ContentText = "To prevent information loss, save your files and close your programs. If that doesn't fix the problem, try restarting your computer."
        .ExpandedInformationText = "If restarting doesn't work, you can <a href=""http://www.microsoft.com"">Read more</a>"
        .ExpandFooterArea = True
        .ExpandedControlText = "Less Information"
        .CollapsedControlText = "More Information"
        .CommonButtons = xtpTaskButtonClose
        .MainIcon = xtpTaskIconWarning
        .ShowDialog
    End With
End Sub
 
You're right this a great update. I've not finished to explore all the new possibilities.


Posted By: Jebo
Date Posted: 16 September 2007 at 10:26am

...but the height of the buttons are too small. Is there any way to set the buttons-height greater?



Posted By: dentor
Date Posted: 16 September 2007 at 10:59am
You can set 'EnableCommandLinks' property to True, to get bigger buttons : 
 
 TaskDialog.CommonButtons = 0
 TaskDialog.AddButton "Close", 100
 TaskDialog.EnableCommandLinks = True
 


Posted By: Jebo
Date Posted: 16 September 2007 at 11:06am
Thanks, but i mean simply standard-buttons, like the MsgBox!


Posted By: cmm2006
Date Posted: 16 September 2007 at 2:33pm
well thank you guys for the help.
it will be the same thing for dialog2?
thank you


Posted By: dentor
Date Posted: 18 September 2007 at 2:56am
Hello cmm2006,
 
A translation of Dialog2:
 
Private Sub Dialog2_Click()
    With TaskDialog
        .Reset
        .CommonButtons = 0
        .AllowCancellation = True
        .EnableHyperlinks = True
        .WindowTitle = "Microsoft Windows"
        .MainInstructionText = "Do you want Windows to automatically install updates?"
        .ContentText = "With automatic updates, Windows periodically checks for new security updates, program improvements, etc. and installs them for you."
        .MainIcon = xtpTaskIconInformation
        .AddButton "Turn on Automatic Updates now" & vbLf & "(recommended)", 1
        .AddButton "Ask me later" & vbLf & "Your computer will be more vulnerable to security problems until you turn on automatic updates.", 2
        .DefaultButton = 1
        .EnableCommandLinks = True
        .ShowDialog
    End With
End Sub
I think it's more usable than xml files.


Posted By: moe188
Date Posted: 18 September 2007 at 1:56pm
Thank you very much, and you are right abou the XML file. is there anyway I can change the green arrow in each button to another icon or picture that I like to use?


Posted By: dentor
Date Posted: 20 September 2007 at 2:05am
I don't find a way to use another icon than the green arrow.
 
I just find the ShowCommandLinkIcons property to display or not the standard task dialog glyph.
 
Perhaps, it's a good idea to put this in the wish list :
CommandLinkIconHandle property to set the handle of a custom icon for Command Links.
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net