Try this.
Font fOld = myRichTextBox.SelectionFont;
FontStyle fStyle;
fStyle = fOld.Style + (IIf(fOld.Bold, (FontStyle.Bold * -1),
FontStyle.Bold));
myRichTextBox.SelectionFont = new Font(fOld.FontFamily, fOld.Size, fStyle);
Yonas
"Sakharam Phapale" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All,
>
> I am new in C#.
>
> Please tell me, how to convert following statements..
>
> Dim fOld As Font = myRichTextBox.SelectionFont
>
> Dim fStyle As FontStyle = fOld.Style + (IIf(fOld.Bold, FontStyle.Bold
> * -1,
> FontStyle.Bold))
>
> myRichTextBox.SelectionFont = New Font(fOld.FontFamily, fOld.Size, fStyle)
>
>
>
> Thanks and Regards,
>
> Sakharam Phapale
>
>
|