Is there any way of controlling the interface of any application currently running? In particular, is there any way of disabling the menus or toolbars? Assuming we have the window id or process id of the application we want to work with.

Here's the scenario. I'm writing bespoke applications working with CAD/CAM softare, and the main VB app controls two or three different applications via OLE. Each application is displayed on the VB Form itself. The applications I'm controlling do not expose any methods to allow the interface to be controlled so I'm wanting to override it some how.

Firstly, I want my VB app to control when the user exits each individual application, so need to disable not only the application close icon, but also the FILE, EXIT menus too.

Secondly, I want to limit the functionality available to the user in the main applications so that they use only the functionality made available through my VB App can be used.

I'm hoping there's some way via the API, so any advice would be much appreciated.

Thanks.