Preventing close of anchor window

A

Andy

I have created an anchor window docked at the bottom of the screen. I
wish to prevent my user from closing this window. Is it possible to
customise off the 'X'

Thanks
 
J

JuneTheSecond

I could not find the way to prevent user from pusshing X nor to restore
closed window automatically, but i can alarm user and promt to do something.
For example in module ThisDocument,

Private WithEvents mywins As Windows

Private Sub Document_DocumentSaved(ByVal doc As IVDocument)
Set mywins = Application.Windows
ActiveWindow.Windows.ItemFromID(1653).Visible = True
End Sub

Private Sub mywins_BeforeWindowClosed(ByVal Window As IVWindow)
If Window.Type = visAnchorBarBuiltIn Then
MsgBox "Save Again"
End If
End Sub
 
A

Andy

Thanks

As my anchor window is not a built in, but my own containing a user
form I chose to catch the terminate event for the user form. When the
user subsequently performs an action I then recreate my anchor window.
 

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