Help and Support

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

Article ID:948528
Last Review:May 14, 2008
Revision:2.0
On This Page

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.

Back to the top

RESOLUTION

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support (http://support.microsoft.com/contactus/?ws=support)
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

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.
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

Back to the top

STATUS

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

Back to the top

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

Back to the top

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.

Back to the top


APPLIES TO
Microsoft Visual FoxPro 9.0 Professional Edition

Back to the top

Keywords: 
kbfix kbexpertiseadvanced kbpubtypekc kbqfe kbhotfixserver KB948528

Back to the top

Article Translations

 

Related Support Centers

Other Support Options

  • Need More Help?
    Contact a Support professional by Email, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.