Help and Support

Article ID: 948528 - Last Review: May 14, 2008 - Revision: 2.1

FIX: The toolbar on an SDI form is disabled in Visual FoxPro 9.0 Service Pack 2

On This Page

Expand all | Collapse all

SYMPTOMS

Consider the following scenario in Microsoft Visual FoxPro 9.0 Service Pack 2:
  • 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.
In this scenario, the toolbar on the SDI form is disabled.

RESOLUTION

Hotfix information

A 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:
http://code.msdn.microsoft.com/KB948528 (http://code.msdn.microsoft.com/KB948528)

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:
http://support.microsoft.com/contactus/?ws=support (http://support.microsoft.com/contactus/?ws=support)

Prerequisites

You must have Visual FoxPro 9.0 Service Pack 2 installed to apply this hotfix.

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The 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.
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Vfp9.exe9.0.0.63035,783,55203-Mar-200821:03
Vfp9r.dll9.0.0.63034,734,97603-Mar-200821:03
Vfp9runtime.msmNot Applicable4,583,42404-Mar-200800:49
Vfp9t.dll9.0.0.63033,907,58403-Mar-200821:04

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information about the ShowWindow property, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn2.microsoft.com/en-us/library/h0ea0kz8(VS.80).aspx (http://msdn2.microsoft.com/en-us/library/h0ea0kz8(VS.80).aspx)
For more information about the WindowType property, visit the following MSDN Web site:
http://msdn2.microsoft.com/en-us/library/xx5k5ydw(VS.80).aspx (http://msdn2.microsoft.com/en-us/library/xx5k5ydw(VS.80).aspx)
For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684  (http://support.microsoft.com/kb/824684/LN/ ) Description of the standard terminology that is used to describe Microsoft software updates

Steps to reproduce the problem

  1. Copy the following code into a new Visual FoxPro program file, and then run the code.
    PUBLIC oform1
    oform1=NEWOBJECT("frmParent")
    oform1.SHOW
    RETURN
    
    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"
    
    	PROCEDURE ACTIVATE
    		WITH THIS
    			IF VARTYPE(.ToolB1) # 'O' OR ISNULL(.ToolB1)
    				.ToolB1 = NEWOBJECT('mytoolbar')
    				.ToolB1.SHOW()
    			ENDIF
    		ENDWITH
    
    	PROCEDURE command1.CLICK
    		PUBLIC Level2
    		Level2 = NEWOBJECT('Level2')
    		Level2.SHOW()
    
    ENDDEFINE
    
    
    
    DEFINE CLASS Level2 AS FORM
    	HEIGHT = 256
    	WIDTH = 387
    	SHOWWINDOW = 1
    	AUTOCENTER = .T.
    	CAPTION = "Level 2"
    	WINDOWTYPE = 1
    	NAME = "LEVEL2"
    ENDDEFINE
    
    
    
    
    DEFINE CLASS MyToolbar AS TOOLBAR
    	SHOWWINDOW = 1
    	PROCEDURE INIT
    		WITH THIS
    			LOCAL i AS INTEGER
    			FOR i = 1 TO 4
    				.ADDOBJECT( 'Cmd' + TRANS( i ), 'MyCMD' )
    			ENDFOR
    			.SETALL( 'Visible', .T., 'MyCmd' )
    			.SETALL( 'Width', 50, 'MyCmd' )
    		ENDWITH
    ENDDEFINE
    
    
    
    
    DEFINE CLASS MyCMD AS COMMANDBUTTON
    	PROCEDURE CLICK
    		WAIT WINDOW THIS.CAPTION TIMEOUT 1
    ENDDEFINE
    
    An SDI form opens automatically. The toolbar and the buttons on the SDI form are enabled.
  2. To open the modal form, click the command button on the form. The toolbar on the SDI form is disabled.

APPLIES TO
  • Microsoft Visual FoxPro 9.0 Professional Edition
Keywords: 
kbfix kbexpertiseadvanced kbpubtypekc kbqfe kbhotfixserver KB948528

Article Translations

 

Related Support Centers