Kn1ght_M4r3
Member
okay this is the problem im having, i wanted to let the font change for the RTB and i altered the code and now its able to change the font without selecting it before hand. though now for the size and color i dont know how to change it. any ideaZ?
rtbDisplay = rich text box
cdlViewer = common dialog
the code:
Private Sub Command1_Click()
cdlViewer.Flags = cdlCFBoth Or cdlCFEffects
cdlViewer.ShowFont
rtbDisplay.Font = cdlViewer.FontName
rtbDisplay.SelFontSize = cdlViewer.FontSize
rtbDisplay.SelBold = cdlViewer.FontBold
rtbDisplay.SelItalic = cdlViewer.FontItalic
rtbDisplay.SelUnderline = cdlViewer.FontUnderline
rtbDisplay.SelColor = cdlViewer.Color
End Sub
Initially the code for line 3 was rtbDisplay.SelFontName but i changed it and now i do not need to select the text i wish to change.
rtbDisplay = rich text box
cdlViewer = common dialog
the code:
Private Sub Command1_Click()
cdlViewer.Flags = cdlCFBoth Or cdlCFEffects
cdlViewer.ShowFont
rtbDisplay.Font = cdlViewer.FontName
rtbDisplay.SelFontSize = cdlViewer.FontSize
rtbDisplay.SelBold = cdlViewer.FontBold
rtbDisplay.SelItalic = cdlViewer.FontItalic
rtbDisplay.SelUnderline = cdlViewer.FontUnderline
rtbDisplay.SelColor = cdlViewer.Color
End Sub
Initially the code for line 3 was rtbDisplay.SelFontName but i changed it and now i do not need to select the text i wish to change.