once i press the button it should be operateand text should become bold letter and if i again press text should become normal
How to do this in windows form application c#
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Santhosh Kumar JayaramanPosted Aug 16, 2012, 1:55 AM
private void button1_Click(object sender, EventArgs e)
{
if (button1.Font.Bold == false)
button1.Font = new Font(button1.Font, FontStyle.Bold);
else
button1.Font = new Font(button1.Font, FontStyle.Regular);
}
Nattudurai EswaramurthyPosted Aug 16, 2012, 3:37 AM
Hope this help to resolve ur issue, if so please select this as accepted Answer.
rashmi kcPosted Aug 16, 2012, 2:25 AM
Nattudurai EswaramurthyPosted Aug 16, 2012, 2:01 AM
PLease try this below code
Hope this help to resolve ur issue, if so please select this as accepted Answer.
Thanks in Adavnce