- You have a top-level single-document interface (SDI) form that contains a toolbar.
- You set the ShowWindow property of the toolbar to 1.
- You open another form inside the SDI form.
You set the WindowType property and the ShowWindow property of the second form to 1.
Hotfix informationA supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.
To download this hotfix from the MSDN Code Gallery, visit the following Microsoft Web site:
Note The MSDN Code Gallery displays the languages for which the hotfix is available. If you do not see your language listed, it is because the Code Gallery resource page is not available for that language.
Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
PrerequisitesYou must have Visual FoxPro 9.0 Service Pack 2 installed to apply this hotfix.
Restart requirementYou do not have to restart the computer after you apply this hotfix.
Hotfix replacement informationThis hotfix does not replace any other hotfixes.
File informationThe global version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
|File name||File version||File size||Date||Time|
Steps to reproduce the problem
- Copy the following code into a new Visual FoxPro program file, and then run the code. An SDI form opens automatically. The toolbar and the buttons on the SDI form are enabled.
DEFINE CLASS frmParent AS FORM
HEIGHT = 387
WIDTH = 570
SHOWWINDOW = 2
AUTOCENTER = .T.
CAPTION = "Toolbar Test"
ToolB1 = .NULL.
ADD OBJECT command1 AS COMMANDBUTTON WITH ;
TOP = 192, LEFT = 132, HEIGHT = 37, ;
WIDTH = 253, CAPTION = "OPEN LEVEL2 WINDOW", ;
NAME = "Command1"
IF VARTYPE(.ToolB1) # 'O' OR ISNULL(.ToolB1)
.ToolB1 = NEWOBJECT('mytoolbar')
Level2 = NEWOBJECT('Level2')
DEFINE CLASS Level2 AS FORM
HEIGHT = 256
WIDTH = 387
SHOWWINDOW = 1
AUTOCENTER = .T.
CAPTION = "Level 2"
WINDOWTYPE = 1
NAME = "LEVEL2"
DEFINE CLASS MyToolbar AS TOOLBAR
SHOWWINDOW = 1
LOCAL i AS INTEGER
FOR i = 1 TO 4
.ADDOBJECT( 'Cmd' + TRANS( i ), 'MyCMD' )
.SETALL( 'Visible', .T., 'MyCmd' )
.SETALL( 'Width', 50, 'MyCmd' )
DEFINE CLASS MyCMD AS COMMANDBUTTON
WAIT WINDOW THIS.CAPTION TIMEOUT 1
- To open the modal form, click the command button on the form. The toolbar on the SDI form is disabled.