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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Santhosh Kumar JayaramanRank #563 · 4.3K reputationPosted Aug 15, 2012, 9:55 PM EDT
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 EswaramurthyRank #5,536 · 296 reputationPosted Aug 15, 2012, 10:01 PM EDT
PLease try this below code
Hope this help to resolve ur issue, if so please select this as accepted Answer.
Thanks in Adavnce
rashmi kc89 reputationPosted Aug 15, 2012, 10:25 PM EDT
Nattudurai EswaramurthyRank #5,536 · 296 reputationPosted Aug 15, 2012, 11:37 PM EDT
Hope this help to resolve ur issue, if so please select this as accepted Answer.