Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search and replace in an Editbox
Message
From
01/01/2001 16:58:13
Rasheed Al Rasheed
Riyadh Armed Forces Hospital
Riyadh, Saudi Arabia
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Search and replace in an Editbox
Miscellaneous
Thread ID:
00458326
Message ID:
00458326
Views:
39
Hi All;
Only recently have I found out about this group of Visual Foxpro users and it is alrady proving very productive. Although I don't worship foxpro but Do I dream about? you bet I do.
I've developed a Laboratory Information System and part of this system is to type medical reports into an editbox. To make it easier and more accurate a table is created with medical phrases and a 5 character unique code for every phrase. When the user types the code followed by ? and F11 the keypress method will fire and extract the code by the use of Mline, RAT and search the table for the phrase. if the code is found, then
lcMn_Descrp = Alltrim(MN.Mn_Descrp) + " "
lcCd_rep = Alltrim(lcSrch_cd) + "?"
lcNewString =STRTRAN(THIS.VALUE,lcCd_rep ,
lcMn_Descrp+"XXXX")
this.VALUE = lcNewString
this.REFRESH
KEYBOARD '{CTRL+F}' + 'XXXX' + '{ESC}' + '{CTRL+G}'
+ '{DEL}' PLAIN
This method is working, but I have a feeling that it is not the best way of doing it and I don't like the use of CTRL+F because it flashes the find window.

Any suggestion for an elegant solution

Thanks
Next
Reply
Map
View

Click here to load this message in the networking platform