|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Searching for text in Text boxesHi all
Newbie question I want to be able to search a text box for text from my program in the way similar to Find (Ctrl+F) does is there any code or a control that can do this ? "David" <Da***@discussions.microsoft.com> wrote in message A textbox in the same application? The Instr or InstrRev functions? news:7DBB4ACA-C65F-47EE-AC8B-927AD11653C8@microsoft.com > Hi all > > Newbie question I want to be able to search a text box for text from > my program in the way similar to Find (Ctrl+F) does is there any code > or a control that can do this ? If not then you need to provide more info. -- Reply to the group so all can participate VB.Net: "Fool me once..." Hi
I import a text file to a text box, I then want to be able to search that text for specific words i.e. "football" and have it highlight it. Show quoteHide quote "Bob Butler" wrote: > "David" <Da***@discussions.microsoft.com> wrote in message > news:7DBB4ACA-C65F-47EE-AC8B-927AD11653C8@microsoft.com > > Hi all > > > > Newbie question I want to be able to search a text box for text from > > my program in the way similar to Find (Ctrl+F) does is there any code > > or a control that can do this ? > > A textbox in the same application? The Instr or InstrRev functions? > > If not then you need to provide more info. > > -- > Reply to the group so all can participate > VB.Net: "Fool me once..." > > "David" <Da***@discussions.microsoft.com> wrote in message If it is only 1 occurrence then a textbox is fine and the Instr function,news:6A6385A9-0B14-47E5-940E-EC845CA926EC@microsoft.com > Hi > > I import a text file to a text box, I then want to be able to search > that text for specific words i.e. "football" and have it highlight it. along with the SelStart and SelLength properties of the textbox will do it. If you need to highlight the word in multiple places then you'll need to use a richtextbox and do something like change the SelForeColor to highlight the words -- Reply to the group so all can participate VB.Net: "Fool me once..." On Thu, 13 Oct 2005 09:19:03 -0700, "David"
<Da***@discussions.microsoft.com> wrote: >Hi all You can use the FindText API function in comdlg32. For more info,> >Newbie question I want to be able to search a text box for text from my >program in the way similar to Find (Ctrl+F) does is there any code or a >control that can do this ? have a look at the following link (watch for wordwrap). [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/commondialogboxlibrary/commondialogboxreference/commondialogboxfunctions/findtext.asp] HTH, Bryan _______________________________ Bryan Stafford New Vision Software newvision_don'tspam@mvps.org
Using shellexecute......
Difference in SQL Syntax between Access and MySQL (from VB6 project using ADO) run time error 5 Picture Box Question Amber Alert Ticker on VB6 Form Help - Single-Select with Listbox... VB IDE Not Integrating Visual SourceSafe Problem Problem offering font selection with listview in regions other than US user-defined type not defined Determine when report printed to specific printer |
|||||||||||||||||||||||