How to do to make the window(gantt chat or the table ) which is open when be saved to be front

Check [RootWorkspace.ActiveProjectViews] from root object and you can see the windows which are opened(ASGViews).

There is amethod called [WindowCount]
in the [ActiveProjectViews] which can return the number of the opened windows.
Use it to find the target window.

The resource gantt chart ,load graph .etc can not be recognized from out side So, prepare property of ASGViews::Caption .etc which can recognize them.

If you use the ASGViews::Caption, the resource code is like the follow one
Dim ActiveWnd As AsLib.ASGViews
Dim ActiveWnd As AsLib.ASGViews

Set ActiveWnd = root.RootWorkspace.ActiveProjectViews
WndNum = ActiveWnd.WindowCount

 For i = 1 To WndNum
‘ Find the load graph.
If InStr(ActiveWnd.Window(i).Caption, “the load graph”) <> 0 Then ActiveWnd.Window(i).MoveToFront ‘ show the window in front.

Now, the load graph will show in front at the caption
※Root Object is the ASORootObject and get it first.