DECLARE SUB DelWord
CREATE Form AS QFORM
Center
CREATE RichEdit AS QRICHEDIT
Width = 312
Align = 1
ADDSTRINGS "<a href=r/ab>Addresses</a>"
ADDSTRINGS "<a href=r/bc>Briefcase</a>"
ADDSTRINGS "<a href=r/ca>Calendar</a>"
ADDSTRINGS "<a href=r/i2>My Yahoo!</a>"
ADDSTRINGS "<a href=r/pp>PayDirect</a>"
ADDSTRINGS "<a href=r/fo>Photos</a>"
END CREATE
CREATE Button AS QBUTTON
CAPTION = "Click me"
Top = 130
Width = 312
OnClick = DelWord
END CREATE
END CREATE
SUB DelWord
text$ = RichEdit.Text
count = TALLY(text$,">")
IF count = 0 THEN EXIT SUB
FOR x = 1 TO count
start = (delimit2 + 1) - lenofdelword
delimit1 = INSTR(start,text$,"<")
delimit2 = INSTR(start+1,text$,">")
lenofdelword = (delimit2 - delimit1) - 1
text$ = DELETE$(text$,delimit1+1,lenofdelword)
NEXT
text$ = text$ - "<>"
RichEdit.Text = text$
END SUB
Form.SHOWMODAL
|