hWnd for a button

L

Lorenz H?lscher

Hi everyone,

I'm looking for the lower left position of a given button on a Word
vba form as mouse coordinates (not the .left/.top properties!) so that
the following code fragment could work:

Call GetWindowRect(myHWND, Rec)
SetCursorPos Rec.Left, Rec.Top

First challenge could be to get the button's window handle. Maybe it
doesn't have one (though listboxes do have) as I found out until now.

Anyone got a nice idea?

Thanx, Lorenz
 
A

Andra

for Word2000 vba forms it seems buttons are painted. ListBox, MultiPage may
be only exception.

Lorenz H?lscher wrote
 
W

Word Heretic

G'day (e-mail address removed) (Lorenz H?lscher),

The VBA Developer's Handbook has some stuff on HWnd tricks.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Lorenz H?lscher reckoned:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top