Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27474

VS 2019 Bold is not a member of FontStyle?

$
0
0
Hello I have some issue with some code I am using..

I am getting this:

error BC30456: 'Bold' is not a member of 'FontStyle'
along with Underline, Italic and Strikeout

the same exact code was working fine in vs 2017 but for some reason something about 2019 is giving me grief about it.
I tried searching but could not find the answer I was looking for.

Code:

If selectionBold Then
                'Bold the current section without affecting other styles.
                ChatEdit.SelectionFont = New Font(ChatEdit.SelectionFont, ChatEdit.SelectionFont.Style And Not FontStyle.Bold)
            Else
                'Unbold the current section without affecting other styles.
                ChatEdit.SelectionFont = New Font(ChatEdit.SelectionFont, ChatEdit.SelectionFont.Style Or FontStyle.Bold)
            End If
        Next


Viewing all articles
Browse latest Browse all 27474

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>