Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MonthView pop-up form
Message
From
10/04/2001 09:52:28
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
MonthView pop-up form
Miscellaneous
Thread ID:
00493989
Message ID:
00493989
Views:
73
I have a form class that I programmatically instantiate and AddObject() a subclassed ( giving KeyPress event response ) MonthView control onto it. The form is used as a popup form for selecting a date.

The form class's ShowWindow property is set to 2-Top Level Form. The form class has two subclasses, one with a ShowWindow property setting of 0-In Screen and another with ShowWindow of 1-In Top Level Form to cover various types of host forms. In order to get proper behavior, the form class or subclass I instantiate depends on the host form's ShowWindow and WindowType properties. Most combinations work correctly. But I have noted that when the host form's ShowWindow is 0-In Screen and WindowType is 1-Modal and I instantiate the 0-In Screen ShowWindow subclassed form, the form and MonthView control appear correctly, but it almost seems like the popup form and it's MonthView control are not properly receiving focus. I have to either use the mouse to click a date or press one of the arrow keys to get the form to "come alive" and the first press of an arrow key does nothing. Before that none of my KeyPress events fire ( like Esc key, etc. ). Once an arrow key is pressed the form and control respond as expected.

When the host form is a modeless form and I instantiate the base popup form class which is Top Level and modeless, everything works as expected. The modality issue seems to be the key but I'm not sure.

Is anyone familiar with this behavior and am I missing something here?

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

Click here to load this message in the networking platform