Dynamic Highlight


Author: Dave
Date: 02.12.14 - 1:52am



here is a small example of how to highlight all instances of a word in a rich text box based off of the users selection. Highlights backcolor of text as well. Highlights are also removed when text is deselected or a new selection is made.

Download VB6 example

I kind of wanted it to be live highlighting as a selection is made instead of working through the SelChange() event which triggers onMouseUp but I couldnt find any examples in a brief web search, and nothing jumped out at me using Spy++. Plus its probably not worth subclassing for that small of a feature.




Comments: (0)

 
Leave Comment:
Name:
Email: (not shown)
Message: (Required)
Math Question: 9 + 67 = ? followed by the letter: H 



About Me
More Blogs
Main Site
Posts: (All)
2024 ( 3 )
2023 ( 9 )
2022 ( 4 )
2021 ( 2 )
2020 ( 4 )
2019 ( 5 )
2018 ( 6 )
2017 ( 6 )
2016 ( 22 )
2015 ( 15 )
2014 (25)
     Query Last 12 Mos
     Progid from Interface ID
     VB6 to C Array Examples
     Human Readable Variant Type
     ScriptBasic COM Integration
     CodeView Addin
     ScriptBasic - Part 2
     Script Env
     MSCOMCTL Win7 Error
     printf override
     History Combo
     Disable IE
     API Hooking in VB6
     Addin Hook Events
     FastBuild Addin
     VB6 MemoryWindow
     Link C Obj Files into VB6
     Vb6 Standard Dlls
     CStr for Pascal
     Lazarus Review
     asprintf for VS
     VB6 GlobalMultiUse
     Scintilla in VB6
     Dynamic Highlight
     WinVerifyTrust, CryptMsgGetParam VB6
2013 ( 4 )
2012 ( 10 )
2011 ( 7 )
2010 ( 11 )
2009 ( 3 )