SEARCH YOUR SOLUTION HERE  

Seltext, do not highlight punctuation mark such as ? . " ,



I have code as follows:

-----------------------

Private Sub Command1_Click() Text1.SetFocus SendKeys "^{Left}+^{Right}" End Sub

----------------------

The code above will highlight string in Text1.
But I want seltext to exclude the punctuation marks like ( " . , etc).

For example, string in Text1 is "Helo".
When I press Command1 (see code above), I want the seltext highlights only the word "Helo", don't include the Interrogation mark ().

Posted On: Wednesday 28th of November 2012 08:48:15 PM Total Views:  175
View Complete with Replies




Related Messages:

How to highlight a selected row in datagrid for asp 2005   (70 Views)
rated by 0 users I use VS2005 to create a web base application. User doesn't like a select button on the row. Anyone can teach me how to highlight a selected row in datagrid. (in datagird event)
How to select (or highlight) generated thumbnails   (101 Views)
rated by 0 users vb city. I'm fairly new to visual basic but I have done a lot of reading. I am trying to create a photo kiosk software where the user loads images, then they are displayed as thumbnails, and then the user can select a thumbnail (or multiple thumbnails) to choose sizes. (imagine a photo kiosk you would see in walmart for example) So far I have done the following. I am able to load images. I then dynamically create a panel box for each image, and within the panel box I create a picture box and a label to display the thumbnails and the actual file name. I even added an event handler to double click on the thumbnail and display it larger. What I want to do is have the user select the thumbnail with a single click. The thumbnail would then get highlighted. The same way you can view thumbnails in a windows folder, and by clicking on it, you can select it...or if you hold ctrl you can select multiple thumbnails. How would I accomplish this I am using visual basic 2010.
Word XP - Capturing 'highlight all items found in'   (102 Views)
I have a word document where i made a macro (by recording) to find all text from '00000' to '/2000:00 ' and then selected the option to 'highlight all items found in main document'. This should, in practice, copy the entire line of every line starting with '00000'. This works fine when i do it manually, when i record the macro it skips the 'highlight all options' and therefore hightlights nothing. looking into the macro it doesnt seem to have any reference to this option, can i type it into the VB manually if so, anyone know what to put in
click on DOM tree node & highlight corresponding html tag   (205 Views)
,I have a webbrowser control & a treeview control...once I load a website I create a HTML DOM tree representation of the website using the code below...What I want to do now, is the following: mouse over any HTML element, which will then select the corresponding tree node on the HTML DOM Tree and the reverse, select any tree node and have the corresponding HTML element highlighted with a red border/box drawn around it Does anyone have any pointers / suggestions - I would really appreciate it... Private Sub UpdateDOM(ByVal HTMLDocument As mshtml.IHTMLDocument3) TreeView1.Nodes.Clear() TreeView1.BeginUpdate() Dim domRoot As mshtml.IHTMLElement = HTMLDocument.documentElement Dim treeRoot As New TreeNode() treeRoot.Text = "" treeRoot.Tag = domRoot TreeView1.Nodes.Add(treeRoot) CopyElementToTree(domRoot, treeRoot) TreeView1.EndUpdate() TreeView1.Expand() End Sub Private Shared Sub CopyElementToTree(ByVal element As mshtml.IHTMLElement, ByVal treeNode As TreeNode) Dim children As mshtml.IHTMLElementCollection = CType(element.children, mshtml.IHTMLElementCollection) If children.length 0 Then For Each e As mshtml.IHTMLElement In children Dim treeChild As New TreeNode() treeChild.Text = getAttrs(e) treeChild.Tag = e treeNode.Nodes.Add(treeChild) CopyElementToTree(e, treeChild) Next e Else If Not String.IsNullOrEmpty(element.innerText) Then Dim textNode As New TreeNode() textNode.Text = String.Format("""{0}""", element.innerHTML) textNode.Tag = element treeNode.Nodes.Add(textNode) End If End If End Sub Private Shared Function getAttrs(ByVal element As mshtml.IHTMLElement) As String Dim result As New StringBuilder("") Return result.ToString() End Function dp.SyntaxHighlighter.ClipboardSwf = '/dp.SyntaxHighlighter/Scripts/clipboard.swf' dp.SyntaxHighlighter.Highlight('4fd5f7f80edc4e7c858cd076ddf2b006')
highlight lat line in richtextbox   (164 Views)
i've created a project to highlight a few line in richtextbox1.but why cant i highlight the last linebelow is my code: Dim i As Integer Dim array1() As String = Textbox1.Lines, array2() As String = RichTextBox1.Lines Dim x As Integer = 0 For i = 0 To UBound(array1) Dim f As Integer = array1(i).Length If array1(i) = array2(i) Then RichTextBox2.Text = RichTextBox2.Text & " *********** " & vbNewLine Else Textbox1.SelectionColor = Color.Red Textbox1.SelectionStart = 0 Textbox1.SelectionLength = f RichTextBox2.Text = RichTextBox2.Text & "error line " & "(" & i + 1 & ")" & " : " & array1(i) & vbNewLine End If x = x + f + 1 Next i
Using CSS in Gridview to highlight rows   (103 Views)
My SiteFAQ's: System | Database | XML | Strings | Collections | Object OrientedGuidlines: Rules | Signature Limit | ''How To'' Best PracticeQuote: The greatest mistake you can make in life is to be continually fearing you will make one. Elbert Hubbard | Post Points: 5 lmf232 St. Louis, MO Since 12/15/2003 Posts 1,202 Reputation 13,840 Reply Larry Fields (lmf232) replied on 2/8/2009 6:03 PM rated by 0 users Matt Berseth has created a nice gridview extender control and has done a lot with highlighting rows. I have used a bunch of his stuff. Don't stop at the gridview stuff Matt has posted about some pretty cool stuff that has been very useful over the years. See if that helps. Also look at some of the other gridview articles because he does a lot without the extender if you don't want to go that route.
How to select (or highlight) generated thumbnails   (193 Views)
vb city. I'm fairly new to visual basic but I have done a lot of reading. I am trying to create a photo kiosk software where the user loads images, then they are displayed as thumbnails, and then the user can select a thumbnail (or multiple thumbnails) to choose sizes. (imagine a photo kiosk you would see in walmart for example) So far I have done the following. I am able to load images. I then dynamically create a panel box for each image, and within the panel box I create a picture box and a label to display the thumbnails and the actual file name. I even added an event handler to double click on the thumbnail and display it larger. What I want to do is have the user select the thumbnail with a single click. The thumbnail would then get highlighted. The same way you can view thumbnails in a windows folder, and by clicking on it, you can select it...or if you hold ctrl you can select multiple thumbnails. How would I accomplish this I am using visual basic 2010.
Re: How do I programatically highlight an item   (92 Views)
I am making my own UC and I need to know when the user selects an item from the listbox (the listbox is the UC, not a real one) it gets highlighted like the picture shows
Re: problem on msflexgrid row highlight   (275 Views)
the result image is attached. I need to have the whole row highlighted and not only the last cell of the last column.
Possible to highlight(color) text in list box?   (152 Views)
I can change the entire list box font to another color but is it possible to highlight/color only a few lines in the list box
When Saving RTB text that is highlighted HOW TO PRESERVE Highlighting Colors?   (185 Views)
I have a question about RTF / Rich Text Box formatting stuff. When I edit my text in RTB and say I have some text highlighted,, then I save the contents of the RTB into a MEMO fled in database,, or even in TXT file,, How do I have to save the contents AND how would I have to retrieve it form the saved location back into RTB so that it keeps the formatting (colors, bold letters,, so on) A mini code sample would be greatly appreciated. OR some guidance.
Is it possible to highlight multiple days in the calendar?   (375 Views)
I have a calendar control and listbox on the form.For example I have a directory containing reports with a date string in the names of each report. Is it possible to have the dates highlighted on the calendar so the user can see that multiple dates have reports assocated with them So if I have a directory called c:\reports Within c:\reports I have a couple of files named: 554420050601_Totals_report.580017.pdf 554420050605_Image_report.580018.pdf On the calendar for the month of June 2005 I need to have the dates 06/01 and 06/05 highlighted. And when you click on those dates the report names will display in a listbox, (or something that allows the user to click the line). So if I click 06/01/05 on the calendar I need the listbox to display: "06/01/2005 Totals Report" and have that be a link to the .pdf file that will display when clicked. I hope this is possible and
How to split out word, space, and punctuation in a sentence ??   (372 Views)
Hi. I'm just a beginnerin using asp .net with visual basic. Now, i meet a problem which is how i can split out word, space, and punctuation in a sentence For example, "Fruits likes apple, banana, and papaya! ok" From the above sentence, i would to split out every word, space, and punctuation, like this:- "Fruits", " ", "likes", " ", "apple", ",", "banana", ",", "and", "papaya", "!", "ok", "" Does anyone know how to do this using asp .net with vb language I need it in order to continue my homework !! [:'(]
Removing spaces and punctuation from string   (296 Views)
I am having trouble. I need to take the data from the string and remove all punctuation and spaces. The purpose of the program is to determine if the phrase entered is a palindrome. Can someone provide and example Here is my code: Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click txtbxoutput.Text = IsPalindrome(txtbxphrase.Text)' declairing function End Sub Function IsPalindrome(ByVal txtbxphrase As String) As Boolean Dim Front As Integer Dim Back As Integer Dim Middle As Integer Dim NotPalindrome As Boolean IsPalindrome = False NotPalindrome = True Back = txtbxphrase.Remove("'", " ") Middle = Back / 2 Front = 1 'declairing values If (Back < 1) Then Exit Function End If Do While (Front Back And Front
combo highlight   (215 Views)
I have two combo control (dropdown combo type) on an SSTab form eventhough the combo is disabled, it looks like it's highlighted (deep blue) What settiong allows highlighting even if the field is disabled Also, is there a way on ...
Hiding listbox selection highlight   (236 Views)
Is there any way to hide (or even better - change the color of) the highlight in a list box, overriding the system color I can't find anything on this, and that damned blue highlight bar is getting on my ...
Select text to bookmark vba   (244 Views)
I'm nursing the end all be all of hangover's right now and as such am having a massive brain fart !!! In VBA how do I select the text from the cursor location to a bookmark Driving me crazy right now ...
Help Tab Control + Bookmarks   (124 Views)
Hi Guys I have a problem Im trying to make a web browser with tabs + bookmarks for the tabs I use tabcontrol but it been colisions with the bookmarks code if I use it cause it want to have a part of a code string which will be Webrowser1 please help me out im pretty new sorry for the newbie question
combining diacritical marks in vb6   (371 Views)
hi I am designing an editor program. I am using ChrW() and AscW() functions to print the character on screen. I want to implement combining diacritical marks(or accent marks) i-e if i print a character and then i want to put diacritic on it by using specific key then i shud be able to place diacritic above or below that character so that they appear as one character. Is there any way to accomplish this in vb
Raw handle referred to a deleted row or a row marked for deletion   (309 Views)
I'm trying to delete several records using SQL OleDB with the following code: Private Sub cmdDel_Click() Call ConnectDB rs.Open "Select * from Users where Name='" & txtName.Text & "'", cn, 3, 3 If Not rs.EOF Then rs.MoveFirst Do Until rs.EOF If rs.EOF Then Exit Do rs.Delete rs.MoveNext Loop rs.Close MsgBox "Success delete", vbInformation Else MsgBox "Record doesn't exist" rs.Close End If End Sub I get an error on rs.MoveNext Please help!