Visio Guy

Visio Discussions => Programming & Code => Topic started by: charlykuntz on November 14, 2012, 10:49:33 AM

Title: Disable tooltips by code
Post by: charlykuntz on November 14, 2012, 10:49:33 AM
Hi all,

is it possible to disable the Visio tooltips by code. In the options menu of the Visio UI there are settings called "Show Shapes window screen tips" or "Show other screen tips" where I can disable these tooltips. Now I am looking for a way to access these settings by code. Apparently the ApplicationSettings object does not offer to set these values.

Does anybody know a solution?

Regards,

Charly.
Title: Re: Disable tooltips by code
Post by: aledlund on November 14, 2012, 03:47:46 PM
I'd probably start by just recording a macro when you execute those commands and see what is recorded.
al
Title: Re: Disable tooltips by code
Post by: charlykuntz on November 14, 2012, 04:03:47 PM
Hi al,

thanks for the advice. Unfortunately these settings were not recorded.

Code (VBA) Select

Sub TooltipDisabling()

    'Enable diagram services
    Dim DiagramServices As Integer
    DiagramServices = ActiveDocument.DiagramServicesEnabled
    ActiveDocument.DiagramServicesEnabled = visServiceVersion140

    'Restore diagram services
    ActiveDocument.DiagramServicesEnabled = DiagramServices

End Sub



Is there settings xml where the Visio settings are stored in?
Title: Re: Disable tooltips by code
Post by: Paul Herber on November 14, 2012, 04:37:42 PM
Settings made via dialogs like this tend not to be recordable.
Title: Re: Disable tooltips by code
Post by: charlykuntz on November 15, 2012, 03:50:05 PM
I found a solution but I am not completely satisfied. There is a setting in the Visio UI that indicates whether all settings are stored in the Windows registry. When this setting is checked I am able to read and manipulate these settings in the registry.

But as I said before this can't be best practice. Does anybody know a more elegant solution?
Title: Re: Disable tooltips by code
Post by: aledlund on November 15, 2012, 07:45:57 PM
Charly,
I just got the feedback I had asked for off-line. The short answer is that you are correct in it is saved in the  registry. Visio reads it when it opens and restores it when it closes. The caution is that nobody should presume that they know the current state of the setup. If you change it, it's your responsibility to restore it so the user doesn't have an issue the next time Visio opens.
al
Title: Re: Disable tooltips by code
Post by: charlykuntz on November 16, 2012, 08:02:58 AM
Hi al,

thank you. So I will do it that way..

Regards.
Browser ID: smf (is_webkit)
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 1: index+Modifications.english (default).
Style sheets: 0: .
Hooks called: 63 (show)
Files included: 25 - 925KB. (show)
Memory used: 747KB.
Tokens: post-login.
Cache hits: 8: 0.00111s for 22,302 bytes (show)
Cache misses: 2: (show)
Queries used: 11.

[Show Queries]