Quantcast
Viewing all articles
Browse latest Browse all 27201

VS 2008 How to delete ( and ) from textbox ?

Hi !
I got a program where user types a text into textbox and then it rewrites the text (sendkeys)
However when a user types a character like ~ % ^ ( ) + it crashes.I have fixed all characters,but ( and ) somehow cant be replaced, (for other i used Replace(TextBox1.Text, "character", " ") )
When i write a ( or ) into the textbox theres a error :
Group markers are unsustainable
and it marks the sendkeys line.
Code :
Code:

Private Sub input3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles input3.Tick
        Replace(TextBox3.Text, "+", " ")
        Replace(TextBox3.Text, "^", " ")
        Replace(TextBox3.Text, "%", " ")
        Replace(TextBox3.Text, "~", " ")
        Replace(TextBox3.Text, "(", " ")
        Replace(TextBox3.Text, ")", " ")
        SendKeys.Send(TextBox3.Text  "{Enter}")
End Sub

How to delete ( and ) from thext (or replace it ? )
Also, why i cant use for example {+} as a replace for + ? When i use {+} it makes space, just like id use " " ...

Viewing all articles
Browse latest Browse all 27201

Trending Articles



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