Microsoft KB Archive/100612: Difference between revisions

From BetaArchive Wiki
(importing KB archive)
 
m (Text replacement - """ to """)
 
Line 77: Line 77:
<pre class="codesample">VERSION 2.00
<pre class="codesample">VERSION 2.00
Begin Form Form1
Begin Form Form1
   Caption        =  &quot;Form1&quot;
   Caption        =  "Form1"
   Height          =  6636
   Height          =  6636
   Left            =  828
   Left            =  828
   LinkTopic      =  &quot;Form1&quot;
   LinkTopic      =  "Form1"
   ScaleHeight    =  6216
   ScaleHeight    =  6216
   ScaleWidth      =  6420
   ScaleWidth      =  6420
Line 86: Line 86:
   Width          =  6516
   Width          =  6516
   Begin SSCommand Command3D2
   Begin SSCommand Command3D2
       Caption        =  &quot;Command3D2&quot;
       Caption        =  "Command3D2"
       Font3D          =  1  'Raised w/light shading
       Font3D          =  1  'Raised w/light shading
       Height          =  1092
       Height          =  1092
Line 95: Line 95:
   End
   End
   Begin SSCommand Command3D1
   Begin SSCommand Command3D1
       Caption        =  &quot;Command3D1&quot;
       Caption        =  "Command3D1"
       Height          =  1212
       Height          =  1212
       Left            =  720
       Left            =  720

Latest revision as of 13:48, 19 July 2020

Knowledge Base


Article ID: 100612

Article Last Modified on 1/8/2003



APPLIES TO

  • Microsoft Visual Basic 3.0 Professional Edition



This article was previously published under Q100612

SYMPTOMS

If a Visual Basic version 2.0 for Windows form file contains THREED.VBX controls with the Font3D property set to a value greater than zero, Visual Basic version 3.0 may incorrectly force other THREED.VBX controls to have the same Font3D property value.

CAUSE

The THREED.VBX custom control for Visual Basic 2.0 does not write a Font3D value to the form file if Font3D = 0. When Visual Basic version 3.0 loads he form, after the Visual Basic environment reads a Font3D value for one control, it gives the same Font3D property value to all the rest of the THREED.VBX controls. In other words, if the last THREED.VBX control loaded is the only one that has a Font3D entry in the form file, none of the other controls are affected.

WORKAROUND

To work around the problem, edit the Visual Basic version 2.0 form files that were saved in ASCII text format to add a Font3D = 0 line to any THREED.VBX controls that do not already have a Font3D entry.

Visual Basic version 2.0 form files that were saved in the binary format can be changed after they are loaded into Visual Basic version 3.0.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem has been corrected in Visual Basic version 4.0.

MORE INFORMATION

The following is an example of a Visual Basic version 2.0 form file that was saved in ASCII format with two 3D command buttons. One button has a Font3D value, and one does not. Note that controls are saved in the form file in the opposite order in which they were created on the form.

VERSION 2.00
Begin Form Form1
   Caption         =   "Form1"
   Height          =   6636
   Left            =   828
   LinkTopic       =   "Form1"
   ScaleHeight     =   6216
   ScaleWidth      =   6420
   Top             =   1152
   Width           =   6516
   Begin SSCommand Command3D2
      Caption         =   "Command3D2"
      Font3D          =   1  'Raised w/light shading
      Height          =   1092
      Left            =   720
      TabIndex        =   1
      Top             =   2640
      Width           =   3012
   End
   Begin SSCommand Command3D1
      Caption         =   "Command3D1"
      Height          =   1212
      Left            =   720
      TabIndex        =   0
      Top             =   840
      Width           =   3012
   End
End
                

Notice that there is not a Font3D setting for Command3D1. If this file were loaded into Visual Basic version 3.0, Command3D1 would have a Font3D value of 1 instead of 0.

To work around the problem, insert the following line between the Caption and Height lines for Command3D1 in the ASCII form file shown above:

   Font3D = 0
                

Now, Visual Basic version 3.0 will read the file correctly.

The Visual Basic 3.0 THREED.VBX writes the Font3D property to the form file for every THREED.VBX control regardless of its value.


Additional query words: buglist3.00 3.00 fixlist4.00

Keywords: kbbug kbfix KB100612