Visio 2016 vsto - Status bar information

Started by ludecadon, August 06, 2018, 01:59:58 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ludecadon

Hi all,

I'm developing a C# VSTO addin for Visio 2016 and am at a point where I need to display a status icon which indicates whether the user is connected to another of our services. The logical place for this would be in the status bar, but according to this thread:

http://visguy.com/vgforum/index.php?topic=4175.msg16310#msg16310

"Visio 2002 and onwards does not allow the customization of the status bar"

Given that it's now 2018 and hopefully Visio has moved on a bit since then, is it still impossible to display status text or an icon in this area? If so, are there any alternatives to the status bar which have the same advantage of being permanently visible to the user?

Any suggestions are welcome.

Nikolay

1. Yes, the status bar API still does not exist.

2. As an idea. You could use dynamic button image (do you have something like 'connect' button? You could change color of this button for example). Or use a 'toggle' button.

Paul Herber

How about putting something in the Quick Access Toolbar?
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

ludecadon

Quote from: Paul Herber on August 06, 2018, 08:40:36 AM
How about putting something in the Quick Access Toolbar?


Thanks for the suggestions - I hadn't thought of the Quick Access Toolbar. Quick searches haven't turned up any useful articles on how to programmatically add icons to the QAT, do you have any resources on this?

Hey Ken


Folks:

   So I was looking for some way to access the status line in Visio.  You can't, I learned; as this thread points out.  Sad.  But in the process I also learned that nowhere does someone have an easily-usable example of how to do it anyway, or at least mimic how it's done.  So here's my mimicry.  DoEvents does it for sure.

   I then went back and included it in any of my macros that take more than a dozen milliseconds.  Cool to watch what's happening as it happens.  In some places I have multiple calls to display the same message with an additional period at the end to show progress; in other places I have it use the For loop index and turn it into a percent that gets redisplayed every time the loop loops.  It could also make for a great debugging tool. Shoulda done it years ago.

   I imagine it could get in the way of some esoteric events randomly firing in response to the create, delete, and of course the dreaded DoEvents.  But I haven't seen any downside as yet, and I am definitely the esoteric type of coder.  I'll check back in if it ever bites me.

   - Ken




Public Sub DisplayStatusLineMessage(TheMessage As String)

Dim TheShape As Shape

Set TheShape = ActiveWindow.Page.DrawRectangle(0, 0, ActivePage.PageSheet.Cells("PageWidth").Result(0), 0.25)
TheShape.Text = TheMessage
TheShape.Cells("Para.HorzAlign").Formula = "=0"
TheShape.Cells("FillForegnd").Formula = "=MSOTINT(RGB(255,255,255),-15)"
DoEvents
TheShape.Delete

End Sub



Ken V. Krawchuk
Author
No Dogs on Mars - A Starship Story
http://astarshipstory.com