Re: Find/Replace

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Fred,
Thanks for this further information, however, I am still having problems
with this. If I just add the following two statements (just to try it) in
the Init code of my form, I just get an 'Edit' option on my menu, with a
'Find' sub-option which is greyed out.
The statements I have include are:
DEFINE POPUP _medit MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR _med_find OF _Medit PROMPT "Find" KEY CTRL+F, "CTRL+F" MESSAGE
"Fidn a string"

Prior to this, I just had a statement
SET SYSMENU TO _MSM_EDIT
in my code, and this does put in the Edit menu, and the Cut, Copy and Paste
options are activated automatically as normal, and do work. However, the
Find and Replace are never activated.

I am using Visual FoxPro Version 6. Do you think this has any bearing?
What version are you using? Do the Find and Replace options get activated on
yours?

Regards,

Robin Baxter

"Fred Taylor" wrote:

> First do a Quick Menu:
>
> 1) MODIFY MENU quick
> 2) From the Menu menu, choose quick menu
> 3) From the Menu menu, choose Generate...
>
> You should now have a quick.mpr program.
>
> From here, edit this file:
> MODIFY COMMAND quick.mpr
>
> Find the "DEFINE POPUP _medit" section and cut and paste the pieces of that
> you want into a separate .PRG For example, if I only wanted CtrlA (Select
> All), CtrlX (Cut), CtrlC (Copy), and Ctrl V (Paste), I'd only copy those
> commands:
>
> DEFINE POPUP _medit MARGIN RELATIVE SHADOW COLOR SCHEME 4
> DEFINE BAR _med_cut OF _medit PROMPT "Cu\<t" ;
> KEY CTRL+X, "Ctrl+X" ;
> PICTRES _med_cut ;
> MESSAGE "Removes the selection and places it onto the Clipboard"
> DEFINE BAR _med_copy OF _medit PROMPT "\<Copy" ;
> KEY CTRL+C, "Ctrl+C" ;
> PICTRES _med_copy ;
> MESSAGE "Copies the selection onto the Clipboard"
> DEFINE BAR _med_paste OF _medit PROMPT "\<Paste" ;
> KEY CTRL+V, "Ctrl+V" ;
> PICTRES _med_paste ;
> MESSAGE "Pastes the contents of the Clipboard"
> DEFINE BAR _med_slcta OF _medit PROMPT "Se\<lect All" ;
> KEY CTRL+A, "Ctrl+A" ;
> PICTRES _med_slcta ;
> MESSAGE "Selects all text or items in the current window"
>
>
> Save it as say "cutandpaste.prg". Now you just call this in the Init of
> your form (DO cutandpaste) and you'll have access to these functions in your
> form. You don't see the menu with those options, but they are available for
> you to use.
>
> --
> Fred
> Microsoft Visual FoxPro MVP
>
>
> "Robin Baxter" <RobinBaxter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:2A03DD06-D9EF-437D-BF17-40B8755856C0@xxxxxxxxxxxxxxxx
> > Would you mind providing an example of what you would expect to see in
> > this
> > 'dummy .MPR program'. What do I need to include in the Init code to
> > enable
> > just the Find menu option?
> >
> > "Fred Taylor" wrote:
> >
> >> Create a dummy .MPR program that contains the setup for those menu items
> >> in
> >> the init of your modal form. The menu itself doesn't have to be made
> >> visible, only the that the pads are available.
> >>
> >> --
> >> Fred
> >> Microsoft Visual FoxPro MVP
> >>
> >>
> >> "Robin Baxter" <RobinBaxter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> >> news:55331487-442C-468D-9B68-F1C815305C11@xxxxxxxxxxxxxxxx
> >> >I am using modal forms to edit text fields in an application (VFP6), and
> >> > cannot get the Find/Replace menu options from the edit menu to
> >> > activate.
> >> > Copy/Paste always seems to be available, but Fin and Replace are not.
> >> > If
> >> > I
> >> > have a non-modal window, they are activated, but I really want to use a
> >> > modal
> >> > window.
> >> > If I cannot get the menu options to activate as required, can I call
> >> > any
> >> > functions directly from code to do this? I would be happy to put a Find
> >> > button on the form to activate a call to the function, but cannot find
> >> > what
> >> > function to call.
> >> >
> >> > Thanks in anticipation.
> >> > Robin
> >>
> >>
> >>
>
>
>
.



Relevant Pages

  • Re: Find/Replace
    ... Isn't INIT too early in the flow? ... >> in the Init code of my form, I just get an 'Edit' ... >> I am using Visual FoxPro Version 6. ... >>> MODIFY COMMAND quick.mpr ...
    (microsoft.public.fox.vfp.forms)
  • Re: Publisher 2000 Clipboard
    ... I actually use 2003 and there is a clipboard under edit on ... It is strange since she is taking a piece of clipart ... from the office website and it tells her it is on the clipboard. ... numerous pieces of clip art, etc. which is quite handy at times. ...
    (microsoft.public.publisher)
  • Re: find, replace, delete
    ... number and copied that to the clipboard. ... Edit - Replace. ... MVP Microsoft [Publisher] ...
    (microsoft.public.word.docmanagement)
  • Re: Publisher 2000 Clipboard
    ... "John Inzer" wrote: ... I actually use 2003 and there is a clipboard under edit on ... It is strange since she is taking a piece of clipart ... from the office website and it tells her it is on the clipboard. ...
    (microsoft.public.publisher)
  • Re: copy and paste text crashes word
    ... The behavior you describe suggests that it may well not be a fault of Word, ... Is there anything other than plain text in what you're copying? ... select Edit> Show Clipboard? ... Have you tried using Edit> Paste Special - ...
    (microsoft.public.mac.office.word)