Group:  Microsoft Word ยป microsoft.public.word.vba.userforms
Thread: VBA Word 2000 - make form stay on top of everything

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

VBA Word 2000 - make form stay on top of everything
"Mark" <markvickers[ at ]gmail.com> 25.09.2006 22:51:34
I've seen posts on this topic, but none of them satisfy what I'm trying
to do. Does anyone know of a way to make a form stay on top of all
applications or even on top of all open Word documents? I want a form
that stays on top even if I minimize its parent Window (the document
from which it was launched). I want it to stay on top even if I click
on another Word document. Is it possible?

I've used the SetWindowPos function, but as soon as I minimize the
form's parent, the form minimizes as well. I've tried using the
SetParent function and the GetDesktopWindow function to make the
desktop the forms parent, but for some reason the GetDesktopWindow
seemed to return the same handle as the form's parent Word document.

Any help would be greatly appreciated.

Re: VBA Word 2000 - make form stay on top of everything
"Mark" <markvickers[ at ]gmail.com> 28.09.2006 15:26:24
OK, for clarification, I found the EXACT functionality I want to try to
replicate. It still have not found a good solution. It must be
possible because Word does it (somehow). I want to replicate the
functionality of the Cross-reference dialog:

In Word (I know this works in 2000 and 20003):

- From the Insert menu, select Reference and then Cross-reference
- Open another Word document
- Click on the older document, then the newer, then the dialog

Notice how the dialog stays on top of all Word documents, and doesn't
bring its original parent to the front when you drag it around, and
doesn't disappear when you minimize one of the documents. You can even
kill its original parent and it won't go away.

I figure there's got to be a way to do this since it's built into
Word!!

Any ideas? Thanks!




Mark wrote:
[Quoted Text]
> I've seen posts on this topic, but none of them satisfy what I'm trying
> to do. Does anyone know of a way to make a form stay on top of all
> applications or even on top of all open Word documents? I want a form
> that stays on top even if I minimize its parent Window (the document
> from which it was launched). I want it to stay on top even if I click
> on another Word document. Is it possible?
>
> I've used the SetWindowPos function, but as soon as I minimize the
> form's parent, the form minimizes as well. I've tried using the
> SetParent function and the GetDesktopWindow function to make the
> desktop the forms parent, but for some reason the GetDesktopWindow
> seemed to return the same handle as the form's parent Word document.
>
> Any help would be greatly appreciated.

Re: VBA Word 2000 - make form stay on top of everything
Russ <drsN0SPAMmikle[ at ]hotmailD0Tcom.INVALID> 28.09.2006 17:18:28
Mark,

[Quoted Text]
> OK, for clarification, I found the EXACT functionality I want to try to
> replicate. It still have not found a good solution. It must be
> possible because Word does it (somehow). I want to replicate the
> functionality of the Cross-reference dialog:
>
> In Word (I know this works in 2000 and 20003):
>
> - From the Insert menu, select Reference and then Cross-reference
> - Open another Word document
> - Click on the older document, then the newer, then the dialog
>
> Notice how the dialog stays on top of all Word documents, and doesn't
> bring its original parent to the front when you drag it around, and
> doesn't disappear when you minimize one of the documents. You can even
> kill its original parent and it won't go away.
>
> I figure there's got to be a way to do this since it's built into
> Word!!
Or it's Word making specific calls to the operating system's windowing
functions. That doesn't necessarily mean Word provides the VBA functions to
do what you want through VBA. Unless you also address the correct windowing
functions through VBA code yourself by calling the operating system's
windowing functions. ( I don't know what they are. ) Modeless forms is the
closest Word seems to come to that type of window and modeless forms don't
work with all versions of Word.
>
> Any ideas? Thanks!
>
>
>
>
> Mark wrote:
>> I've seen posts on this topic, but none of them satisfy what I'm trying
>> to do. Does anyone know of a way to make a form stay on top of all
>> applications or even on top of all open Word documents? I want a form
>> that stays on top even if I minimize its parent Window (the document
>> from which it was launched). I want it to stay on top even if I click
>> on another Word document. Is it possible?
>>
>> I've used the SetWindowPos function, but as soon as I minimize the
>> form's parent, the form minimizes as well. I've tried using the
>> SetParent function and the GetDesktopWindow function to make the
>> desktop the forms parent, but for some reason the GetDesktopWindow
>> seemed to return the same handle as the form's parent Word document.
>>
>> Any help would be greatly appreciated.
>

--
Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net