CSHARPWINDOWSFORM Telegram 129
الدالة performClick()

وظيفتها توليد حدث Click لزر

مثال
int i = 0;
private void button1_Click(object sender, EventArgs e)
{

if (i % 2 == 0)
{
button2.PerformClick();
}
else
{

MessageBox.Show("button2 was NOT clicked");
}

i = i + 1;

}

private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show("Hello");
}

عند الضغط على الزر الأول سيتم تنفيذ دالة الزر الثاني وعند الضغط مرة أخرى سيتم تنفيذ دالة الزر الأول
وهكذا اذا كانت i عدد زوجي سوف يتم تنفيذ الزر الثاني واذا كانت عدد فردي سيتم تنفيذ الزر الأول


يعني ان الدالة perfromClick تعمل وكأن المستخدم هو الذي ذهب بمؤشر الماوس الى الزر الثاني وضغط عليه

مثال اسهل لكي توضح الفكرة اكثر

private void button1_Click(object sender, EventArgs e)
{


button2.PerformClick();



}

private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show("Hello");
}





https://www.tgoop.com/CsharpWindowsForm



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

الدالة performClick()

وظيفتها توليد حدث Click لزر

مثال
int i = 0;
private void button1_Click(object sender, EventArgs e)
{

if (i % 2 == 0)
{
button2.PerformClick();
}
else
{

MessageBox.Show("button2 was NOT clicked");
}

i = i + 1;

}

private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show("Hello");
}

عند الضغط على الزر الأول سيتم تنفيذ دالة الزر الثاني وعند الضغط مرة أخرى سيتم تنفيذ دالة الزر الأول
وهكذا اذا كانت i عدد زوجي سوف يتم تنفيذ الزر الثاني واذا كانت عدد فردي سيتم تنفيذ الزر الأول


يعني ان الدالة perfromClick تعمل وكأن المستخدم هو الذي ذهب بمؤشر الماوس الى الزر الثاني وضغط عليه

مثال اسهل لكي توضح الفكرة اكثر

private void button1_Click(object sender, EventArgs e)
{


button2.PerformClick();



}

private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show("Hello");
}





https://www.tgoop.com/CsharpWindowsForm

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




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

View MORE
Open in Telegram


Telegram News

Date: |

Co-founder of NFT renting protocol Rentable World emiliano.eth shared the group Tuesday morning on Twitter, calling out the "degenerate" community, or crypto obsessives that engage in high-risk trading. Each account can create up to 10 public channels The initiatives announced by Perekopsky include monitoring the content in groups. According to the executive, posts identified as lacking context or as containing false information will be flagged as a potential source of disinformation. The content is then forwarded to Telegram's fact-checking channels for analysis and subsequent publication of verified information. The creator of the channel becomes its administrator by default. If you need help managing your channel, you can add more administrators from your subscriber base. You can provide each admin with limited or full rights to manage the channel. For example, you can allow an administrator to publish and edit content while withholding the right to add new subscribers. With the administration mulling over limiting access to doxxing groups, a prominent Telegram doxxing group apparently went on a "revenge spree."
from us


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