Here is a Java example from https://forum.openoffice.org/en/forum....
XModel model = (XModel) UnoRuntime.queryInterface(XModel.class, xSpreadsheetDocument);
XController c = model.getCurrentController();
XFrame frame = c.getFrame();
XWindow window = frame.getContainerWindow();
XSystemDependentWindowPeer xWindowPeer = (XSystemDependentWindowPeer) UnoRuntime.queryInterface(XSystemDependentWindowPeer.class, window);
int handle = (Integer) xWindowPeer.getWindowHandle("".getBytes(), SystemDependent.SYSTEM_WIN32);
It's up to you to translate this into _VB.Net_. If you encounter a specific problem while attempting to translate it, then describe the problem and we can help.
EDIT:
Here is example Basic code from http://openoffice.2283327.n4.nabble.c....
handle = window.getWindowHandle(dimarray(), 1) ' 1=WIN32
Documentation: getWindowHandle.