Re: Capture ALL movements...event?



APIs are calls to functions within compiled code modules: including, for
your purposes, elements of Windows itself.

Mechanically, it's fairly simple. You declare the API function using
something like --

Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal
lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam
As Long, ByVal lParam As Long) As Long

Then call the function as you would any other function in your code

WindowProc = CallWindowProc(PrevProc, hWnd, uMsg, wParam, lParam)

In practice, it's hard work: you have to get things exactly right or you can
scramble your system.


Google will find you details of these functions and how to use them.
Specifically, there are API calls that examine, add to, and remove from, the
User Interface message queue, which contains *everything* the user does,
with mouse, keyboard, or whatever else they may be using. You might want to
pursue this out of interest, but this is way more work than you'll want to
get into for the purposes you describe.






"Brenda" <Brenda@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0DA88256-6C54-40B1-9C49-BF58FB29AFE7@xxxxxxxxxxxxxxxx
Hi Tony

You said earlier "Alternatively some low level APIs might get you there."
I
was wondering if you could explain that a little bit more to me? The
WindowsSelectionChange just doesn't work very well at all. I need
something
a little bit better. Thanks for your time!
--
Brenda


"Tony Jollans" wrote:

Apart from the dynamic position data, there are the toggles (OVR, TRK,
etc)
which will be even harder to mimic.

Tell your boss it's not possible. Offer him a macro behind a toolbar
button
which would pop up a pretend status bar with data at that instant rather
than a fully dynamic one. That would be *much* easier and might keep him
happy.

--
Enjoy,
Tony


"Brenda" <Brenda@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DD85F148-420A-4882-82A7-05270EF8D353@xxxxxxxxxxxxxxxx
To me, I could care less about the status bar, but my boss is admit
about
having it display for our users. Ideally, I wish it would work in IE.
I
guess I'll just have to deal with the WindowSelectionChange the best I
can.

Thanks!
--
Brenda


"Tony Jollans" wrote:

No. There just simply isn't an event which fires off every keystroke.

It might, theoretically, be possible to assign every keystroke to a
macro
and perform some appropriate action, but it would be extremely
difficult
to
write and a hell of a perfomance hit and would probably still fail in
some
cases (field updates, for example). Alternatively some low level APIs
might
get you there.

For sure this won't be easy even if it's possible. Is the status bar
that
important to you?

--
Enjoy,
Tony


"Brenda" <Brenda@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AC399026-856F-40F9-87E6-D6FB62407323@xxxxxxxxxxxxxxxx
Tony

They do you have something else that you use that works better?

--
Brenda


"Tony Jollans" wrote:

Yes, it is the closest - but still quite a long way off.

--
Enjoy,
Tony


"Jonathan West" <jwest@xxxxxxxx> wrote in message
news:u8NT3PaLGHA.3896@xxxxxxxxxxxxxxxxxxxxxxx

"Brenda" <Brenda@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1368F07C-B7EC-4862-A83E-9A1BDF6B89EE@xxxxxxxxxxxxxxxx
Currently I am trying to create my own StatusBar because the
Word
StatusBar
doesn't display when you are using it with Internet Explorer.
My
question
is
what event do you use to capture every movement of the
cursor(pointer)
so
I
can display the current line, section, column, etc...? I've
tried
Me.SelectionChange but it only captures some of the
movements.
It
doesn't
capture when I hit the Enter button, etc...

Any ideas? Thanks for your time!

The closest I think you can get to this is the
WindowSelectionChange
event.
The following article shows you how to write event procedures
for
application-level events

Writing application event procedures
http://www.word.mvps.org/FAQs/MacrosVBA/AppClassEvents.htm


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition
www.classicvb.org












.