BUG: HalfHeightCaption Form Causes Small Empty Control Menu (193253)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a
  • Microsoft Visual FoxPro for Windows 6.0

This article was previously published under Q193253

SYMPTOMS

If you run a top-level form with the HalfHeightCaption property set to true (.T.) and you minimize the form, right-clicking the form icon on the system task bar causes a small empty control menu to display.

RESOLUTION

Here are the two workarounds for this problem:

Method 1

Create the form using the following code example:
   PUBLIC oform  && If run from a program file.
   oform = CREATEOBJECT('form1')
   oform.Show()
 
   DEFINE CLASS form1 AS form
      ShowWindow = 2
      AutoCenter = .T.
      HalfHeightCaption = .T.
      Name = "Form1"
      Caption = "Form1"
   ENDDEFINE
				

Method 2

If the form is created with the Form Designer, place the following code in the Deactivate and Paint events of the form.

In the Deactivate event:
   DoDefault()
   IF Thisform.WindowState = 1
      Thisform.HalfHeightCaption = .F.
      Thisform.Icon = Thisform.Icon
   ENDIF
				
In the Paint event:
   IF Thisform.WindowState = 1
      Thisform.HalfHeightCaption = .F.
   ELSE
      Thisform.HalfHeightCaption = .T.
   ENDIF
				

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

MORE INFORMATION

This behavior does not occur if the form is created using code instead of the Form Designer.

Steps to Reproduce Behavior

  1. Create a form named Myform.
  2. Set the two following properties of the form:
          HalfHeightCaption = .T.
          ShowWindow = 2 - As Top-Level Form
  3. Save and run Myform.
  4. Click the minimize button to minimize the form.
  5. In the System Taskbar, right-click the icon to display the control menu. A small empty control menu displays.

Modification Type:MajorLast Reviewed:12/11/1999
Keywords:kbbug KB193253 kbAudDeveloper