In this page you can find the VB.Net Code...


(1) Random Number :

Textbox1.text = CStr(Int(Rnd() * size))

(2) Select All :

Textbox1.SelectAll
Richtextbox1.SelectAll

(3) Length :

Textbox1.SelectAll
Msgbox(Richtextbox1.Selectedtext.length)

(4) Deselect All :

Textbox1.DeselectAll
Richtextbox1.DeselectAll()

(5) Upercase :

Richtextbox1.SelectedText = Richtextbox1.SelectedText.ToUpper()

(6) Lowercase :

Richtextbox1.SelectedText = Richtextbox1.SelectedText.ToLower()

(7) Redo :

Richtextbox1.Redo()

(8) Undo :

Richtextbox1.Undo()

(8) Cut :

Richtextbox1.Cut()

(9) Copy :

Richtextbox1.Copy()

(10)Paste :

Richtextbox1.Paste()

(11) Bold :

Dim curfont As Font = Richtextbox1.SelectionFont
If Richtextbox1.SelectionFont.Bold = True Then
Richtextbox1.SelectionFont = New Font(curfont.FontFamily, curfont.Size, FontStyle.Regular)
Else
Richtextbox1.SelectionFont = New Font(curfont.FontFamily, curfont.Size, FontStyle.Bold)
End If

(12) Italic :

Dim curfont As Font = Richtextbox1.SelectionFont
If Richtextbox1.SelectionFont.Italic = True Then
Richtextbox1.SelectionFont = New Font(curfont.FontFamily, curfont.Size, FontStyle.Regular)
Else
Richtextbox1.SelectionFont = New Font(curfont.FontFamily, curfont.Size, FontStyle.Italic)
End If

(13) Underline :

Dim curfont As Font = Richtextbox1.SelectionFont
If Richtextbox1.SelectionFont.Underline = True Then
Richtextbox1.SelectionFont = New Font(curfont.FontFamily, curfont.Size, FontStyle.Regular)
Else
Richtextbox1.SelectionFont = New Font(curfont.FontFamily, curfont.Size, FontStyle.Underline)
End If

(14) Font :

If FontDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
Richtextbox1.SelectionFont = FontDialog1.Font
End If

(15) Text Color :

If ColorDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
Richtextbox1.SelectionColor = ColorDialog1.Color
End If

(16) Text BackColor :

If ColorDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
Richtextbox1.BackColor = ColorDialog1.Color
End If

(17) Bullet :

If Richtextbox1.SelectionBullet = True Then
Richtextbox1.SelectionBullet = False

Else
Richtextbox1.SelectionBullet = True
End If

(18) Text Alignment Left:

Richtextbox1.SelectionAlignment = HorizontalAlignment.Left

(19) Text Alignment Center:

Richtextbox1.SelectionAlignment = HorizontalAlignment.Center

(20) Text Alignment Right:

Richtextbox1.SelectionAlignment = HorizontalAlignment.Right

(21) Save coding with MS Access Database:

Dim con As New
OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:note.mdb")
Dim cmd As New OleDb.OleDbCommand
Try
cmd.Connection = con
cmd.CommandText = "INSERT INTO Table1(a_data,b_data,c_data) VALUES('" & Richtextbox1.Text & "',# " + DateTimePicker1.Value + "#,'" & TextBox2.Text & "');"
con.Open()
cmd.ExecuteNonQuery()
con.Close()
Catch ex As Exception
MsgBox("Your profie is Saved")
End Try
Me.Richtextbox1.Text = ""
Me.TextBox2.Text = ""

(21) Round Off:

newvalue = FormatNumber(sum,2, ,Tristate.Flase)


=> Do you also want a homepage for free? Then click here! <=