E
Ed from AZ
I have a VB6 app that opens a Word doc (Word 2000) and set the focus
to the doc. For ease of use while using this program, I wanted to be
able to close the doc with a single-key input. Word already has CTRL
+W and CTRL+F4, but it would be easier to use just one single key. I
was thinking of the accent/tilde key, since I won't be using it while
running my VB app.
I tried to capture the keystroke in my VB app - but realized that the
Word doc is active, so the keystroke gets inserted into the doc,
rather than being seen by the VB app. When the doc is opened, the VB
form is set to Visible = False, and reset to Visible = True when the
doc is closed.
So I need a way to map Word's Close command to a different keystroke
only while running this VB app, and release it when the app closes.
Or can I retain focus on the VB app so it can read the keystroke, even
though the Word doc is in front of the form? How do I approach this?
Ed
to the doc. For ease of use while using this program, I wanted to be
able to close the doc with a single-key input. Word already has CTRL
+W and CTRL+F4, but it would be easier to use just one single key. I
was thinking of the accent/tilde key, since I won't be using it while
running my VB app.
I tried to capture the keystroke in my VB app - but realized that the
Word doc is active, so the keystroke gets inserted into the doc,
rather than being seen by the VB app. When the doc is opened, the VB
form is set to Visible = False, and reset to Visible = True when the
doc is closed.
So I need a way to map Word's Close command to a different keystroke
only while running this VB app, and release it when the app closes.
Or can I retain focus on the VB app so it can read the keystroke, even
though the Word doc is in front of the form? How do I approach this?
Ed