> I've got code that creates a Word template and sets a project password.
>
[quoted text clipped - 13 lines]
> I've tried a few of the messages with ShowWindow, but no success.
> How do I get the window to display normally?

Signature
Mike
Microsoft MVP Visual Basic
> > I've got code that creates a Word template and sets a project password.
> >
[quoted text clipped - 17 lines]
> rather than a "VB issue". Asking in Word/Excel/Office VBA programming
> newsgroups is more likely to get you answers.
It's an API issue.
I found a way to get the handle of the minimized window by using the caption
"TF_FloatingLangBar_WndTitle".
I then did a SetFocusAPI.
Followd that with a SW_Restore, but the only thing that got restored was a
small empty dialog (all fill color), which I can easily get rid of only by
rebooting.
That proved that I had the correct handle and that I could set the focus, so
the next thing I tried was the keybd_event to send a vbCr.
Alas, that did indeed send the code, but unlike a click with mouse, all it
does is cause an infinite loop creating clones of the icon.
So my next step was to try
mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, curx,
cury, 0&, 0&
Again, this just resulted in an infinite loop creating clones of the icon.
Since I can right, or left, click on the icon, while the code is running, to
display the dialog, I expect that there is a way to do this with the API. So
far, no luck in finding the magic function or message.
It is necessary to show the dialog, otherwise, I cannot get access to the
dialog's handles.
"TF_FloatingLangBar_WndTitle" must be some magic caption. It's handle does
not allow me to get the handles of the dialog controls.
Well, I am a bit Lost now, so I guess I betta go watch Lost in a few
minutes, and I have not eaten in about 16 hours, so I betta also find my
fridge.
Although I have not yet found a way to restore the minimized and flashing
icon, I found a way to prtevent te Project Properties dialog from being
minimized in the first place.
In the original Word version of the code, Word itself was minimized. Even
so, Word did not minimize the Project Properties dialog.
In the Excel version, apparently Excel does minimize the Project Properties
dialog if Excel is minimized.
Turns ot, at this point, it is not necessary t minimize either Word or
Excel, so after pulling the WindoeState setting, Excel does not minimize the
dialog.
However, I'd still like to know how to restore such a minimized dialog.
I'll play with that separately later.
TC - 28 Apr 2005 09:18 GMT
It still makes sense to ask again in a Word, Excel or VBA newsgroup.
Certain Office programs have VBA statements that might help. (Eg.
Access VBA's AppActivate.)
HTH,
TC
Howard Kaikow - 28 Apr 2005 12:00 GMT
> It still makes sense to ask again in a Word, Excel or VBA newsgroup.
> Certain Office programs have VBA statements that might help. (Eg.
> Access VBA's AppActivate.)
This app is automating Word from VB 6, it is an API issue as to how to show
the minimized window,