Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

How to get currently active form/viewer?

Valued Contributor
Valued Contributor

Hi,

 

is there any way to get the currently active form or viewer of Process Simulate?

then maybe I can get some attributes(controls value) of the form/viewer.

 

thanks.

3 REPLIES 3

Re: How to get currently active form/viewer?

Valued Contributor
Valued Contributor

Through TxViewersManager Class there is a GetActiveViewer Method.  Give it a whirl. Smiley Happy

 

TxViewerControl activeViewer = TxApplication.ViewersManager.GetActiveViewer();

Re: How to get currently active form/viewer?

Valued Contributor
Valued Contributor
Thanks

and any way to get the active form?

Re: How to get currently active form/viewer?

Valued Contributor
Valued Contributor

What do you mean by form - maybe an example?  When I hear form I am thinking that it is a custom TxForm that is designed by you, so it should be pretty easy to deterimine whether it is active.  If this is what you mean, there is a Focused property for windows controls.