Private Sub bttnReplaceAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bttnReplaceAll.Click
Dim curPos, curSel As Integer
curPos = TXTPadForm.TxtBox.SelectionStart
curSel = TXTPadForm.TxtBox.SelectionLength
TXTPadForm.TxtBox.Text = Replace(TXTPadForm.TxtBox.Text, Trim(searchWord.Text),Trim(replaceWord.Text))
TXTPadForm.TxtBox.SelectionStart = curPos
TXTPadForm.TxtBox.SelectionLength = curSel
End Sub