c# - Find active winform in solution explorer -


i started working on existing solution has large number of winforms. there quick way find design time form, in visual studio solution explorer, when application running?

please note: debug/break me find modal forms (dialogs). interested in finding modeless winforms too. don't consider plowing through design time menus , events quick way..

you make debug menu item on main form , put in :

string test = string.empty; foreach (form item in application.openforms) {     test += item.gettype().tostring() + environment.newline; }  messagebox.show(test); 

this give list of openforms markus g suggested without need of creating form this.

also @ :

https://msdn.microsoft.com/en-us/library/system.windows.forms.form.activeform(v=vs.110).aspx

it explains how can identify active form, usual microsoft has made things bit complex having 2 methods, 1 mdi forms , 1 none mdi forms


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

mapreduce - Resource manager does not transit to active state from standby -

serialization - Convert Any type in scala to Array[Byte] and back -