How to use GetWindowRect API?
Hi
Can anyone tell me how to use GetWindowRect API?
I know where to get the API using API Text Viewer. However, do I need to define rect using the following codes :-
Type Rect
Left as long
Right as long
Top as long
Bottom as long
end type
How can I get the left, top, right and bottom dimensions of a form using this GetWindowRect API?
Pls Pls enlighten....source code will be better!
Thankyou!!
Beginner with problems
Re: How to use GetWindowRect API?
You have to use the hwnd of the window you want to get the RECT of
ie.
dim myrect as RECT
dim x as long
x=GetWindowRect(form1.hwnd,myrect)
This will give you the Rectangle for form1
you can then use
myrect.top,myrect.bottom etc