View Full Version : بدست آوردن لیست فرمهای استفاده شده در برنامه
Developer Programmer
یک شنبه 03 خرداد 1388, 23:40 عصر
چطور میشه اسامی فرمهای استفاده شده در برنامه رو بدست آورد؟
adinochestva
یک شنبه 03 خرداد 1388, 23:42 عصر
فرم های باز یا کل فرم ها ؟
Developer Programmer
یک شنبه 03 خرداد 1388, 23:52 عصر
کل فرمهای موجود
adinochestva
دوشنبه 04 خرداد 1388, 00: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, 12: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());
vBulletin® v4.2.5, Copyright ©2000-1403, Jelsoft Enterprises Ltd.