Hi!
Is there DODEFAULT() in the myform.Refresh()?
>Hi,
>
>>This is not a bug. This is VFP limitation for dodefault()/:: operator call of the method of parent class that has no code. My guess is that "myform" class contains no code in Refresh method right?
>
>No. "myform" contains code in the refresh event. This class code is the only reason of using the :: operator.
>
>Andreas
>
>>
>>More simple sample:
>>
>>Put a control on the form (standard text box). In the KeyPress event put dodefault(). Run and try to type something. Each character doubled!
>>
>>This is known behavior that require from programmer to know if parent class contains any code in the method/event.
>>
>>HTH.
>>
>>>Hi,
>>>
>>>using a custom form class, which has some code in the refresh event can lead to a double
>>>refresh of all controls. This slows the whole form times 2.
>>>
>>>How to reproduce:
>>>
>>>Create a custom form class ("myform") and add to the refresh event some output lines:
>>>e.g.
>>>ACTIVATE SCREEN
>>>? "FORMREFRESH"
>>>
>>>Create a new form using the new class.
>>>Put a text box on the form with a refresh event:
>>>e.g.
>>>ACTIVATE SCREEN
>>>? "BOXREFRESH"
>>>
>>>Put a command button on the form with a Click method:
>>>THISFORM.Refresh()
>>>
>>>If you run this form everything works OK: clicking the button leads to the following
>>>output:
>>>FORMREFRESH
>>>BOXREFRESH
>>>
>>>The bug occurs in the following case. Edit the new form's refresh event:
>>>myform::Refresh && we inherit the class event code
>>>... && any futher code.
>>>
>>>Now we get the following output:
>>>FORMREFRESH
>>>BOXREFRESH
>>>BOXREFRESH
>>>
>>>All controls on the form are refreshed two times instead of one time. The class code is only
>>>called once, but the VFP default refresh in the case of a form refresh refreshes all controls twice.
>>>
>>>Andreas
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.