Post Reply

Forums -> UltraMon™ -> UltraMon.Window with events
John Fors   2014-03-21 11:01
I'm using VBA embedded in an application ProcessBook to display some documents via the
Util.Run method. I then grab the window reference using Wnd.GetAppMainwindow(util.Processid, 10000).
This allows me to get the window position .top .left .height .width.

Works great but what I would really like is to be able to declare the Win reference with the "WithEvents" qualifier to receive an event when the window is moved and update my attributes. I can't get vba to accept the Ultramonlib.dll as a reference as it looks like a .net library.

Is there a way I can get this functionality?

Thanks Sincerely

John J Fors
Christian Studer   2014-03-21 13:10
The UltraMon COM library doesn't support this, you would need to use a hook to get notified about window position changes.

Christian Studer - www.realtimesoft.com
John Fors   2014-03-28 07:05
Just to follow up with a work around. I ended up establishing a timer and from the timer event polling for the Window.Left, .top, width, .height.

With an error handle that when the Process id is gone shuts down the timer.

John J Fors
Forums -> UltraMon™ -> UltraMon.Window with events

Post Reply