May 13th, 2004, 11:07 PM
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.
hwnd : THandle;
hWnd := FindWindow(nil, 'Google - Microsoft Internet Explorer');
if (hWnd > 0) then
SetWindowPos(hWnd, HWND_TOP, 10, 10, 200, 200, SWP_NOMOVE);
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