Quantcast
Viewing all articles
Browse latest Browse all 27052

How To Make A Child Window Immovable

Hi All,
Here I have a child window such as Microsoft Word window set to a VB Form. The issue is that the Word window is movable inside the form. This is undesirable. The only way I have tried to prevent this movement at the moment was to remove the WS_CAPTION attribute from the window like this:

Code:

dim defaultAttribute as Integer = GetWindowLong(hWnd, GWL_STYLE)

dim preferedAttribute as Integer =  defaultAttribute And (Not WS_CAPTION)

SetWindowLong(hWnd, GWL_STYLE, preferedAttribute)

The window can no longer be moved because the Toolbar has been removed. But I need the Toolbar and the window caption in the window. Anybody knows how I can resolve this problem?

Thanks.

Viewing all articles
Browse latest Browse all 27052

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>