Home > database >  Consult, if the judge is a window from the OPEN or by OPENSHEET OPEN?
Consult, if the judge is a window from the OPEN or by OPENSHEET OPEN?

Time:09-22

MDI window, if the judge is a window from the OPEN or by OPENSHEETWITHPARM OPEN?? Taken out of use parentwindow () function, two ways to open the window type is the same??

CodePudding user response:

There seems little point in seem to distinguish

CodePudding user response:

Try using the following code

Boolean bValid

The window wSheet

Lb_sheets. Reset ()

WSheet=ParentWindow. GetFirstSheet ()

The DO while IsValid (wSheet)

If w_sheet. Classname ()='your window name then
//should be opened by opensheet
End the if

WSheet=ParentWindow. GetNextSheet (wSheet)

Loop


//if this window was not found in this way, and should be opened in the open mode

CodePudding user response:

Boolean bOpenSheet=false

The window wSheet

Lb_sheets. Reset ()

WSheet=ParentWindow. GetFirstSheet ()

The DO while IsValid (wSheet)

If w_sheet. Classname ()='your window name then
BOpenSheet=true
//should be opened by opensheet
End the if

WSheet=ParentWindow. GetNextSheet (wSheet)

Loop

If bOpenSheet then
Messagbox (', 'Opensheet try to open the')
The else
Messagebox (', 'Open Open way')
End the if

Don't know if you could see