Microsoft KB Archive/170597: Difference between revisions

From BetaArchive Wiki
m (Text replacement - """ to """)
m (Text replacement - "&" to "&")
 
(One intermediate revision by the same user not shown)
Line 68: Line 68:
<li>Change the Name of the Container to TstC1.</li>
<li>Change the Name of the Container to TstC1.</li>
<li><p>Add a command button, named CB0, to the form with the following code in the Click event:</p>
<li><p>Add a command button, named CB0, to the form with the following code in the Click event:</p>
<pre class="codesample">      ThisForm.TstC1.SpecialEffect = 0 &amp;amp;&amp;amp;Raised
<pre class="codesample">      ThisForm.TstC1.SpecialEffect = 0 &&Raised
       ThisForm.Refresh</pre></li>
       ThisForm.Refresh</pre></li>
<li><p>Add another command button to the form, CB1, with the following code in Click event:</p>
<li><p>Add another command button to the form, CB1, with the following code in Click event:</p>
<pre class="codesample">      ThisForm.TstC1.SpecialEffect = 1  &amp;amp;&amp;amp;Sunken
<pre class="codesample">      ThisForm.TstC1.SpecialEffect = 1  &&Sunken
       ThisForm.Refresh</pre></li>
       ThisForm.Refresh</pre></li>
<li>Run the Form and click on the command buttons several times.</li></ol>
<li>Run the Form and click on the command buttons several times.</li></ol>
Line 83: Line 83:


       ThisForm.TstC1.Visible = .F.
       ThisForm.TstC1.Visible = .F.
       ThisForm.TstC1.SpecialEffect = 0 &amp;&amp;Raised
       ThisForm.TstC1.SpecialEffect = 0 &&Raised
       ThisForm.TstC1.Visible = .T.
       ThisForm.TstC1.Visible = .T.


Line 89: Line 89:


       ThisForm.TstC1.Visible = .F.
       ThisForm.TstC1.Visible = .F.
       ThisForm.TstC1.SpecialEffect = 1 &amp;&amp;Sunken
       ThisForm.TstC1.SpecialEffect = 1 &&Sunken
       ThisForm.TstC1.Visible = .T.</pre></li>
       ThisForm.TstC1.Visible = .T.</pre></li>
<li>Save and run the form. After clicking the command buttons, the effect of the Container will now change according to the SpecialEffect property setting.</li></ol>
<li>Save and run the form. After clicking the command buttons, the effect of the Container will now change according to the SpecialEffect property setting.</li></ol>

Latest revision as of 12:54, 21 July 2020

Article ID: 170597

Article Last Modified on 12/11/1999



APPLIES TO

  • Microsoft Visual FoxPro 5.0 Standard Edition
  • Microsoft Visual FoxPro 5.0a
  • Microsoft Visual FoxPro 6.0 Professional Edition



This article was previously published under Q170597

SYMPTOMS

In Visual FoxPro 5.0x, the SpecialEffect property of a Container control does not refresh to display as 0-flat, 1-sunken, or 2-raised at run time.

STATUS

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

MORE INFORMATION

When changing the SpecialEffect property of a Container control to 0-flat, 1-sunken, or 2-raised, at run time, the Container does not reflect the change even after the REFRESH method has been issued. The only way to refresh the Container control is to click on an object other than the form that contains the Container object, and then click back on the form. At this point, the Container is refreshed correctly.

Steps to Reproduce Behavior

  1. Create a Form and place a Container control on it.
  2. Set the SpecialEffect property of the Container to "2 - Flat(Default)."
  3. Change the Name of the Container to TstC1.
  4. Add a command button, named CB0, to the form with the following code in the Click event:

          ThisForm.TstC1.SpecialEffect = 0 &&Raised
          ThisForm.Refresh
  5. Add another command button to the form, CB1, with the following code in Click event:

          ThisForm.TstC1.SpecialEffect = 1  &&Sunken
          ThisForm.Refresh
  6. Run the Form and click on the command buttons several times.

NOTE: The effect of the Container stays the same and does not change to the specified setting of SpecialEffect.

Here is the workaround for the above sample:

  1. Replace the code in steps 4 and 5 from the above example with the following code:

       Step4:
    
          ThisForm.TstC1.Visible = .F.
          ThisForm.TstC1.SpecialEffect = 0 &&Raised
          ThisForm.TstC1.Visible = .T.
    
       Step5:
    
          ThisForm.TstC1.Visible = .F.
          ThisForm.TstC1.SpecialEffect = 1 &&Sunken
          ThisForm.TstC1.Visible = .T.
  2. Save and run the form. After clicking the command buttons, the effect of the Container will now change according to the SpecialEffect property setting.


Keywords: kbbug KB170597