properties wala event wala akunupahara eketh keypress eka thoranna
properties wala event wala akunupahara eketh keypress eka thoranna

ඔහොම දැම්මට පෙස් කළාම වැඩනැතෝ![]()


එහෙම විතරක් දැම්මට වැඩක නෑ බන්, ඒ event එක ඇතුලට උබේ logic එක දාපන්..ඔහොම දැම්මට පෙස් කළාම වැඩනැතෝ![]()

yeah you asked for the code
so I gave you just try it.
go to the designer.css
and copy paste this code
somewhere close to attributes of the button
this.button.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.button_KeyPress)
then in the form.css use this code
private void button_KeyPress(object sender, KeyPressEventArgs e)
{
if(e.KeyCode()== Keys)
{
}
}
you may use Keys like this
Keys.F8
or
Keys.F7 etc..

key code කියන්නේ මොකද්ද?![]()

if(e.KeyCode== Keys.F8)
{
}
මෙහෙම දාන්න



this.button.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.[COLOR=Red]button_KeyPress[/COLOR])