Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Flashing Form
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00118734
Message ID:
00119221
Views:
19
>>For those interested ... some time back I posted a message saying I was setting my forms' position and size in the Init or Show methods but that some ( not all ) forms were flashing before appearing in the adjusted position/size. I finally tracked this down to doing a SetFocus in the Init or Show of the errant forms. This was forcing the Activate to fire which was flashing the form before it finally displayed in its desired position/size. I removed the offending SetFocus statement(s), the problem disappeared and life is good again. :-)
>>
>>Bill
>
>Not that I want your life to return to the bad old days, but where did you put your SetFocus() command so that your form would continue to start correctly?

Hi Barbara,

I basically just let the form set focus to the default control. I was doing the SetFocus() stuff to get grids to update after initializing them. It sometimes seemed that a Refresh() was not always sufficient to get a full update on the grid so I included a SetFocus() also. It's been awhile since I looked at this grid refreshing thing, but I think it had to do with the record pointer indicator or the whole row being highlighted or something like that. Anyway, I remember that there was something about the grid appearance I didn't like on initialization that was cured by doing a SetFocus() to it then a SetFocus() to the default field. In this case I just decided to dump the SetFocus()'s to make sure I didn't get the flashing form problem ( which is MUCH more annoying :-) ).
I haven't looked at where to put the SetFocus() if it's really needed or what else to do to avoid the flashing problem in the presence of the SetFocus(). Maybe test for a "first time in the form" property in the GotFocus() of the default field and set focus from there or something like that.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Reply
Map
View

Click here to load this message in the networking platform