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

موضوع اليوم بسيط جداً وهو عن كيف تقوم ببرمجة واجهه فورم


فكرة برمجة الفورم تعتبر نفس فكرة باقي أدوات التحكم

وهي عنطريق انشاء كلاس يورث من الكلاس Form

او عنطريق انشاء اوبجكت من الكلاس Form


الطريقة الأولى :


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing;

namespace MY_Calculator
{
class myform : Form
{

public myform()
{
Size = new Size(600, 400);
BackColor = Color.LightSteelBlue;
this.CenterToScreen();
}}}
بهذه الطريقة بالنسبة للخصائص فهو يورثها من الكلاس Form
لذالك الخصائص التي لم نقم بتعديل قيمها فهو سوف يورثها بقيمها الافتراضية
this.CenterToScreen();
اما الكود في السطر السابق فهو يجعل الفورم الخاص بك يظهر في منتصف الشاشة
الدالة CenterToScreen تقوم بعمل الخاصية StartPosition = FormStartPosition.CenterScreen

الان لكي تشاهد الفورم الخاص بك

قم بإضافة زر واكتب الاسطر التالية
private void button1_Click(object sender, EventArgs e)
{
new myform().Show();

this.Hide();
}

او بهذه الطريقة تنشئ اوبجكت من كلاس الفورم
myform f1 = new myform();
f1.Show();


ولاضافة أداة للفورم الخاص بك قم بتعريف اوبجكت من كلاس Button وتهيئه خصائصه
انشاء اوبجكت
Button btn = new Button()
{
Size = new Size(98, 45),
Text = "my button"
};
لكي تقوم باضافتة الى الفورم اكتب السطر التالي بداخل دالة البناء
this.Controls.Add(btn);
👍1



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

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

موضوع اليوم بسيط جداً وهو عن كيف تقوم ببرمجة واجهه فورم


فكرة برمجة الفورم تعتبر نفس فكرة باقي أدوات التحكم

وهي عنطريق انشاء كلاس يورث من الكلاس Form

او عنطريق انشاء اوبجكت من الكلاس Form


الطريقة الأولى :


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing;

namespace MY_Calculator
{
class myform : Form
{

public myform()
{
Size = new Size(600, 400);
BackColor = Color.LightSteelBlue;
this.CenterToScreen();
}}}
بهذه الطريقة بالنسبة للخصائص فهو يورثها من الكلاس Form
لذالك الخصائص التي لم نقم بتعديل قيمها فهو سوف يورثها بقيمها الافتراضية
this.CenterToScreen();
اما الكود في السطر السابق فهو يجعل الفورم الخاص بك يظهر في منتصف الشاشة
الدالة CenterToScreen تقوم بعمل الخاصية StartPosition = FormStartPosition.CenterScreen

الان لكي تشاهد الفورم الخاص بك

قم بإضافة زر واكتب الاسطر التالية
private void button1_Click(object sender, EventArgs e)
{
new myform().Show();

this.Hide();
}

او بهذه الطريقة تنشئ اوبجكت من كلاس الفورم
myform f1 = new myform();
f1.Show();


ولاضافة أداة للفورم الخاص بك قم بتعريف اوبجكت من كلاس Button وتهيئه خصائصه
انشاء اوبجكت
Button btn = new Button()
{
Size = new Size(98, 45),
Text = "my button"
};
لكي تقوم باضافتة الى الفورم اكتب السطر التالي بداخل دالة البناء
this.Controls.Add(btn);

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


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

View MORE
Open in Telegram


Telegram News

Date: |

Select: Settings – Manage Channel – Administrators – Add administrator. From your list of subscribers, select the correct user. A new window will appear on the screen. Check the rights you’re willing to give to your administrator. When choosing the right name for your Telegram channel, use the language of your target audience. The name must sum up the essence of your channel in 1-3 words. If you’re planning to expand your Telegram audience, it makes sense to incorporate keywords into your name. Public channels are public to the internet, regardless of whether or not they are subscribed. A public channel is displayed in search results and has a short address (link). Telegram message that reads: "Bear Market Screaming Therapy Group. You are only allowed to send screaming voice notes. Everything else = BAN. Text pics, videos, stickers, gif = BAN. Anything other than screaming = BAN. You think you are smart = BAN. Your posting frequency depends on the topic of your channel. If you have a news channel, it’s OK to publish new content every day (or even every hour). For other industries, stick with 2-3 large posts a week.
from us


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