Hi!
There are several approaches for this.
1. This approach is usually used in the frameworks. Create base class for each control that you will use on the form for data editing. Create the form base class and base all your data forms on that form class. In the form class create a method "IsModified". In the base classes for each data control in the InteractiveChange even call thisform.IsModofied(). On each form defoine a code in the IsModified method on the form that will do everything reqiured as soon as used edited something (for example, in your case this is changing Enabled property of the Save button). Alternatively, in VFP6 or later, you can do this even better way: In the form class create a property "IsModified". In the base classes for each data control in the InteractiveChange even set thisform.IsModofied property to .T.. Define the _Assign method for IsModified property. In each data form you will be able to catch the moment when IsModified property changed and refresh controls on the form properly.
2. Call thisform.Refresh in the Valid event of each control. In the Refresh method of other controls (Save button) set the state of control properly. You can determine if data edited by using GetFldState(-1) function, if data not edited, it returns the string with all "1" in it. This approach is not very reliable, and sometimes slow.
3. Put a timer on the form that will check if data modified each 100 milliseconds, and if modified - change controls on the form.
HTH.
>Hi,
>
>I want to make enable command button (SAVE) in the form, then was done some modify in the fields (textbox, combo box) in that form. How establish that was maked some changes.
>
>Thanks
>Eugenijus
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.