Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple READ EVENTS question
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00095596
Message ID:
00095865
Views:
26
>John,
>
>Did you try the excersize of just getting two simple modeless forms to work? Are these forms in a formset?

>In all the method code where you have search. change it to thisform. Thisform is a "nameless" reference to the form that contains the objects, and depending on several things the form might or might not create a memvar named search.
>
>Get rid of the ON KEYs and use the form KeyPress method with KeyPreview=.t. instead, this encapsulates the form better.
>
>I don't think you want to do search.mpr everytime the form activates, i.e. gets focus. You should maybe just do it once in the form.Init() and undo it in the form.Destroy()
>
>The PUBLICs you are using would be much better off being custom properties of the form, again because it encapsulates the form better.
>
>The duplicated code in the Activate() and Refresh() can probably just be in the Refresh()


David,

Thanks for your suggestions on the code I sent to you! I did make many of the changes to my code using your ideas and all works fine! The reason I put the call to the menus in the activate of my child forms is because I am going to have a seperate menu for each child form and I wanted to make sure that the menu was executed each time the particular child form was active. I haven't figured out yet why I was having trouble with the scoping issue, but will try your suggestion on creating two simple modeless forms. This has been quite a learning experience for me thus far and I apprecaite the time you spent helping me. I'll let you know how the simple form excersize works out for me, and maybe we can determine what was the root of my scoping issue for my child forms. I am curios though about one thing though. When would someone determine to use the top level form and place the child forms in the top level form? is this just a developers preference instead of using in screen. Thanks, and I hope to hear from you soon.

John.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform