
May 13th, 2004, 11:07 PM
|
 |
Banned ;)
|
|
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
|
|
Assuming you've already opened the window and you know the title of the window (or have another way to get the window handle of the browser window you just opened), you can do this. In the following code, I use FindWindow to find the specific window by title, so I can get its window handle. Then I call SetWindowPos to set the size.
Code:
var
hwnd : THandle;
begin
hWnd := FindWindow(nil, 'Google - Microsoft Internet Explorer');
if (hWnd > 0) then
SetWindowPos(hWnd, HWND_TOP, 10, 10, 200, 200, SWP_NOMOVE);
end;
Since I've specified SWP_NOMOVE, the call ignores the values I used for the window position and only resizes the window. If you want the window to move as well as resize, take out the SWP_NOMOVE. You might want to read the help docs for SetWindowPos to see what the various options are.
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
|