Write VB.NET program to the following operation on the Rich text box values font Style:- i)Font color ii)Indent iii)SaveText iv)Exit Add the following to your form i)One Rich Text Box ii)Six command Button controls(Font Style,Font Color, Indent,Save Text,Exit).
Public Class Form1 Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click End End Sub Private Sub btnIndent_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnIndent.Click rtbData.SelectionIndent = 20 rtbData.SelectionHangingIndent = -20 rtbData.SelectionRightIndent = 5 End Sub Private Sub btnFontColor_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFontColor.Click rtbData.SelectionColor = Color.Blue End Sub Private Sub btnFontStyle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFontStyle.Click Dim f As New Font(rtbData.Font, FontStyle.Underline) rtbData.SelectionFont = f End Sub Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim f As New Font(rtbData.Font.Size, 10) rtbData.SelectionFont = f End Sub Private Sub btnSavetext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSavetext.Click rtbData.SaveFile("C:\Users\harish\Desktop\New folder (2)") End Sub End Class
Write VB.NET program to the following operation on the Rich text box values font Style:- i)Font color ii)Indent iii)SaveText iv)Exit Add the following to your form i)One Rich Text Box ii)Six command Button controls(Font Style,Font Color, Indent,Save Text,Exit).
Reviewed by
on
April 27, 2015
Rating: