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 [email protected] (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:
 
Top