Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem modifying a Form

Status
Not open for further replies.

JohnWMcDonald

Programmer
Apr 14, 2009
3
US
I open a form using the "modify" command in my project. The form has several buttons, labels, etc. (nothing exotic). I right click on the form (not an object within the form) and select "code" from the sub-menu. One of the methods of the form appears in the editable area (all is well). I close this edit window and then right click on a button within the form. I expect the code FOR THAT BUTTON to appear, HOWEVER, the code from the form which I had just closed appears instead. In general, when I open a form, the FIRST method I open for edit works fine, but any subsequent request to edit code reverts to the first request. I have deleted all occurrences of foxuser.* and have issued a resource = OFF command upon booting VFP. Neither has resolved the problem. I am convinced the problem is VFP environment since all of my projects (10 of them) behave the same way.
 
This has not caught my attention, because once I'm in the MEthod Editor I tend to navigate to other Methods by the Comboboxes "Object" and "Procedure" or I do this (and this work still):

Hold CTRL, click to the object you want (CTRL especially helps with containers, pageframes/pages etc.). Once the control is active release CTRL and double click, that'll give you the Click Event (or Procedure) of that control and it's easy to change Procedure from there.

Bye, Olaf.
 
John,

As far as I know, there's nothing you can do to fix this particular problem. It's a VFP bug, and Microsoft knows about it.

Olaf has given you an alternative way of getting to the code. There are several others (which you probably already know). I generally either double-click on the control, or use the Document View Window.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Thanks Olaf. Indeed, your suggestion does work. In fact, if you are working in a simple form (not pageframe, etc), you do not even need the CTRL key. You can double-click right into the desired code window. Grateful as I am for your solution, I still want to resolve the original issue which may involve badgering MicroSoft (wish me luck with that) or de-installing SP2.
 
I still want to resolve the original issue which may involve badgering MicroSoft (wish me luck with that) or de-installing SP2.

Good Luck...

Maybe a silly question But whats wrong with just Double Clicking the control to open the procedure? Or opening the Properties and then the method you want to edit? Its the same amount of steps involved...

I am sorry and I am sure you have your reasons, but I am missing the relevence of this... You would rather uninstall sp2, badger microsoft about a product they have discontinued, just so you can select "code" from the "short" menu as opposed to selecting "properties"...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top