If it in your app then its just changing the width and height properties but if its not your app then you need to use APIs. FindWindow to get the main window handle to that apps window to be resized. Then SetWindowLong or SetWindowPlacement or even SetWindowPos.

Search the forums as I have code examples.