Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / August 2007

Tip: Looking for answers? Try searching our database.

Keystrokes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sunouchi@ - 31 Jul 2007 22:39 GMT
Hello
I would like to know how to handle some keystrokes.
I have a textbox on a form. If that textbox has the focus, characters
enter into the textbox when I hit the keyboard.
However, if the textbox doesn't have the focus, where is the
information of the keystrokes going to? And can I still use those
keystrokes? Is there a way to use the keystrokes that seems to go into
'space'?

Another question is (perhaps related) I am working on a form and in a
document almost simutaneously. I type text continiously, then I just
want to hit a check box or an option box, so that the text that I type
goes solely into the document and not in the textbox and when I hit
the checkbox again, the text should go solely into the textbox and not
in the document. The form should not unload or hide while I am typing
text into the document. Is that possible?

Thanks in advance,
Sunouchi
Jonathan West - 01 Aug 2007 11:57 GMT
> Hello
> I would like to know how to handle some keystrokes.
> I have a textbox on a form. If that textbox has the focus, characters
> enter into the textbox when I hit the keyboard.
> However, if the textbox doesn't have the focus, where is the
> information of the keystrokes going to?

They go to whichever window has the focus.

> And can I still use those
> keystrokes? Is there a way to use the keystrokes that seems to go into
> 'space'?

Not from within Word VBA. You would need to do some system programming,
intercepting the Windows message queue and putting in your own message
handler. This can't be done from within VBA, but can be done using other
languages.

> Another question is (perhaps related) I am working on a form and in a
> document almost simutaneously. I type text continiously, then I just
[quoted text clipped - 3 lines]
> in the document. The form should not unload or hide while I am typing
> text into the document. Is that possible?

You can use the vbModeless paremeter with the Show method of the UserForm.
The form can then stay open even when the focus moves to the underlying
document.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.