Prevent docking on an anchored window

A

Andy

I have created an anchored window containing a form. It starts of
anchored. I would like my user to be able to float this window or
anchor it. However, I would like to prevent it from being docked. Does
anyone know if its possible to prevent this? Or failing that, is it
possible to keep it anchored where my code places it, preventing the
user from moving it.

Thanks
 
J

JuneTheSecond

I could not find out the way to lock the position of anchored window.
An alternative mat be to check the position and return to the right position.
for example if it is a anchored shape data window.

Dim mywin As Visio.Window
Set mywin = ActiveWindow.Windows.ItemFromID(visWinIDCustProp)
If mywin.WindowState = visWSDockedLeft + visWSVisible Then
mywin.WindowState = visWSFloating + visWSAnchorLeft
End If
 
A

Andy

I have ended up catching the event for the window change, if it has
been docked I then set the window state back to floating.

It's not ideal, but at least it prevents it from remaining docked.
 

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