Control after .SRC property set

G

Gary Shell

I use the following code to open a Cross-functional Flowchart stencil. This
immediately pops up a dialog box asking the user to indicate orientation and
number of swimlanes. My VB.NET app does not receive control back until AFTER
the user has clicked the OK box on the dialog box. I wanted to automate
that, but can't figure out how to get control back in my app right after
executing the Me.AxDrawingControl1.SRC property set.

Can any one suggest a way to accomplish this?

Gary

AppVisio = Me.AxDrawingControl1.Document.Application

'tell Visio to click OK to the dialog box

AppVisio.AlertResponse = 1

Me.AxDrawingControl1.Src = "Cross-functional Flowchart.vst"
 
G

Gary Shell

Actually, I have to execute an "Application.DoEvents" before the stencil
actually opens and the dialog box appears, but as soon as I execute the
DoEvents my VB.NET app does NOT get control back until the user clicks the
OK button in the dialog box.

Gary
 
J

JuneTheSecond

I have tested "AppVisio.AlertResponse = 1" in VBA, directly on the Visio2003
drawing scope, but I could not found any effect to the behaviour of the
dialog for Cross-functional Flowchart. I think it is because the dialog is
not a Visio's native alarming dialog, but of an addon for Cross-functional
Flowchart. It seems the dialog is controlled by the addon that is not opened
to the users, so I do not think a user can change its behaviour.
 
G

Gary Shell

Your assessment is spot on. I'd determined the exact same thing. But, I
wonder if there is any event within VISIO that my VB.net app can subscribe
to that MIGHT give me control once the add-on has begun it's execution???

I am pursuing that angle and will report back.

Gary
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top