CSHARPWINDOWSFORM Telegram 220
موضوع اليوم عن كيفية عمل اختصارات لوحة المفاتيح في برنامجك Windows Forms



قي البداية يجب ان تجعل خاصية KeyPreview تساوي true وهي من خصائص الفورم


بعد ذالك تقوم باضافة هذه الدالة الى كلاس الفورم

protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == (Keys.Control | Keys.F))
{
MessageBox.Show("What the Ctrl+F?");
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}


الان عندما تقوم بالضغط على Ctrl+F سوف تظهر رسالة MessageBox
يمكنك ان تقوم باي حدث تريده عند الضغط على الاختصار



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

موضوع اليوم عن كيفية عمل اختصارات لوحة المفاتيح في برنامجك Windows Forms



قي البداية يجب ان تجعل خاصية KeyPreview تساوي true وهي من خصائص الفورم


بعد ذالك تقوم باضافة هذه الدالة الى كلاس الفورم

protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == (Keys.Control | Keys.F))
{
MessageBox.Show("What the Ctrl+F?");
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}


الان عندما تقوم بالضغط على Ctrl+F سوف تظهر رسالة MessageBox
يمكنك ان تقوم باي حدث تريده عند الضغط على الاختصار

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


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

View MORE
Open in Telegram


Telegram News

Date: |

Click “Save” ; “[The defendant] could not shift his criminal liability,” Hui said. Hashtags During the meeting with TSE Minister Edson Fachin, Perekopsky also mentioned the TSE channel on the platform as one of the firm's key success stories. Launched as part of the company's commitments to tackle the spread of fake news in Brazil, the verified channel has attracted more than 184,000 members in less than a month. A Hong Kong protester with a petrol bomb. File photo: Dylan Hollingsworth/HKFP.
from us


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