PDA

View Full Version : بدست آوردن لیست فرمهای استفاده شده در برنامه



Developer Programmer
یک شنبه 03 خرداد 1388, 22:40 عصر
چطور میشه اسامی فرمهای استفاده شده در برنامه رو بدست آورد؟

adinochestva
یک شنبه 03 خرداد 1388, 22:42 عصر
فرم های باز یا کل فرم ها ؟

Developer Programmer
یک شنبه 03 خرداد 1388, 22:52 عصر
کل فرمهای موجود

adinochestva
یک شنبه 03 خرداد 1388, 23:38 عصر
Then you need to enumerate all the types defined in your assembly and check if they inherit from Form type.




System.Reflection.Assembly.GetCallingAssembly().Ge tTypes()


http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/96bb8900-8253-4315-b838-7a90a21b6fd4

ASKaffash
دوشنبه 04 خرداد 1388, 11:19 صبح
سلام
به شکل ذیل :


Type[] A = System.Reflection.Assembly.GetExecutingAssembly(). GetTypes();
for (int i = 0; i < A.Length; i++)
if (A[i].BaseType.Name == "Form")
this.listBox1.Items.Add(A[i].ToString());