CSHARPWINDOWSFORM Telegram 38
بسم الله الرحمن الرحيم

موضوع اليوم : هو عن كيفية فتح اكثر من Form في Form واحد

مثال: لو كان معك في مشروعك 3 نماذج (Form) وتريد اظهار الفورم 3 و 2 في الForm1

أولا قم ب إضافة panel واجعل خاصية Dock تساوي Top
قم بإضافة 2 ازرار وضعهم بداخل الحاوية panel

الان اذهب لخصائص Form1 وابحث عن الخاصية IsMdiContainer اجعل قيمتها تساوي true
بعد تعديل قيمة الخاصية ستلاحظ ان لون الForm قد تغير وهذا يعني ان الفورمات الأخرى ستظهر بداخله

الان قم بالضغط على button1 ضغطتين للدخول لدالة الحدث Click
واكتب هذا الكود


private void button1_Click(object sender, EventArgs e)
{
Form2 f2 = new Form2();
f2.Show();
f2.MdiParent = this;
}

نفس العملية مع الزر الثاني ولاكن للفورم 3


private void button2_Click(object sender, EventArgs e)
{
Form3 f3 = new Form3();
f3.Show();
f3.MdiParent = this;
}



tgoop.com/CsharpWindowsForm/38
Create:
Last Update:

بسم الله الرحمن الرحيم

موضوع اليوم : هو عن كيفية فتح اكثر من Form في Form واحد

مثال: لو كان معك في مشروعك 3 نماذج (Form) وتريد اظهار الفورم 3 و 2 في الForm1

أولا قم ب إضافة panel واجعل خاصية Dock تساوي Top
قم بإضافة 2 ازرار وضعهم بداخل الحاوية panel

الان اذهب لخصائص Form1 وابحث عن الخاصية IsMdiContainer اجعل قيمتها تساوي true
بعد تعديل قيمة الخاصية ستلاحظ ان لون الForm قد تغير وهذا يعني ان الفورمات الأخرى ستظهر بداخله

الان قم بالضغط على button1 ضغطتين للدخول لدالة الحدث Click
واكتب هذا الكود


private void button1_Click(object sender, EventArgs e)
{
Form2 f2 = new Form2();
f2.Show();
f2.MdiParent = this;
}

نفس العملية مع الزر الثاني ولاكن للفورم 3


private void button2_Click(object sender, EventArgs e)
{
Form3 f3 = new Form3();
f3.Show();
f3.MdiParent = this;
}

BY برمجة تطبيقات الويندوز C# Programming


Share with your friend now:
tgoop.com/CsharpWindowsForm/38

View MORE
Open in Telegram


Telegram News

Date: |

The group also hosted discussions on committing arson, Judge Hui said, including setting roadblocks on fire, hurling petrol bombs at police stations and teaching people to make such weapons. The conversation linked to arson went on for two to three months, Hui said. Done! Now you’re the proud owner of a Telegram channel. The next step is to set up and customize your channel. With the sharp downturn in the crypto market, yelling has become a coping mechanism for many crypto traders. This screaming therapy became popular after the surge of Goblintown Ethereum NFTs at the end of May or early June. Here, holders made incoherent groaning sounds in late-night Twitter spaces. They also role-played as urine-loving Goblin creatures. Click “Save” ; Telegram users themselves will be able to flag and report potentially false content.
from us


Telegram برمجة تطبيقات الويندوز C# Programming
FROM American