Make sure QTP with a new test and a blank notepad is open. Write the below script in a new test and run it. Don't open the notepad in maximize mode, keep it for example as shown in the screen shot.
Dim h, w
Sub GetROProperty_Example()
h = Window("text:=Untitled - Notepad").GetROProperty("height")End Sub
w = Window("text:=Untitled - Notepad").GetROProperty("width")
msgbox h
msgbox w
GetROProperty_Example
Sub Window_Maximize()
Window("text:=Untitled - Notepad").MaximizeEnd Sub
Window_Maximize
Sub Window_Minimize()
Window("text:=Untitled - Notepad").MinimizeEnd Sub
Window_Minimize
Sub Window_Restore()
Window("text:=Untitled - Notepad").RestoreEnd Sub
Window_Restore
Sub Window_Resize()
Window("text:=Untitled - Notepad").Resize w, hEnd Sub
Window_Resize