Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Active Form?
 

Active Form?

Hi,
In my application, how could i find the active form ( current form on screen) from some where else? 
e.g. let say i have a main module in my application which has some code to handle unhandled exceptions. In this module i need to know the current form ( the name of the current form) on screen . How could i do this?
Thanks
MigrationUser 1  Tuesday, January 27, 2004 2:18 PM
are you using MDI????

if you are using MDI then you would go me.activechild

other wise there are other ways including some unmanaged ways.

If you are not using MDI then maybe you should be adding all the forms to a collection and adding a handler for when those forms close they get removed from the collection. 

That might help
MigrationUser 1  Tuesday, January 27, 2004 2:45 PM
chabordaf:

Check out the Form.ActiveForm property. Funny, I had never run across this before looking it up today. Guess I just never needed it <g>.

MigrationUser 1  Wednesday, January 28, 2004 4:54 PM

You can use google to search for other answers

Custom Search

More Threads

• Textbox databinding in a data Form (Autocalculated fields )
• How to Remove DataGrid's Default Column
• Strange combobox data integrity error on form closing??
• Saving modified date
• Binding ArrayList (of Structures) to a Datagrid Question?
• DataGridViewCheckBoxColumn value not being set in data source
• How do you get the whole error icon to be displayed
• DataSet - DataGridView - Refresh
• Vertial Resizing of a DataGrid
• Windows application to SQL server Connection