1

How to check window state(minimized,maximized etc) in Team developer ? Is there any built in function available for the same ?

2 Answers2

0

You can use SalGetWindowState() function for checking window state. Function take only one argument which is the handle of the window to be checked.

If SalGetWindowState(windowhandle) = Window_Minimized
  Call VisWinShow(windowhandle, SHOW_Normal)

Please Note: VisWinShow() function sets visibility state of a window. Its first argument is the window handle and second argument can be SHOW_Minimized, SHOW_Normal, SHOW_Maximized or SHOW_Hidden.

Chandralal
  • 559
  • 2
  • 11
  • 26
0

Using SalGetWindowState(hWndForm) you can check any of the following states:

`Window_Invalid    ( Value = 1 )
 Window_Maximized  ( Value = 3 )
 Window_Minimized  ( Value = 4 )
 Window_Normal     ( Value = 5 )
 Window_NotVisible  ( Value = 2 )`  

Of course if you are using Word automation, you can't refer to hWndForm, so in this case use:

Set nState = iWord__Application.PropGetWindowState( )

Other options are:

Set bIsMaximised = VisWinIsMaximized (hWndForm)
Set bIsMinimised = VisWinIsMinimized(hWndForm)
Set bIsNormal = VisWinIsRestored (hWndForm)
Set bIsValid = VisWinIsWindow(hWndForm)
Steve Leighton
  • 790
  • 5
  • 15