FIX: Can't Restore Default Foxhead Icon After Set Icon PropID: Q135906 3.00 3.00b WINDOWS kbprg kbbuglist kbfixlist The information in this article applies to:
SYMPTOMSAfter setting the Icon property of the _SCREEN object in Visual FoxPro to an icon file or to blank, you can't restore the default foxhead icon. If you set _SCREEN.Icon="", then only a square white box is shown when Visual FoxPro is minimized when running under Windows 3.x or Windows NT. In Windows 95, the icon shown on the task bar button for the minimized Visual FoxPro, is a generic gray button that looks like a program window with a blue title bar. These same incorrect icons show up when switching tasks by pressing ALT+TAB.
WORKAROUNDThere are at least two known workarounds for this, each one with its own advantages and disadvantages.
Workaround OneUse the MODIFY WINDOW SCREEN command without any clauses to set the Visual FoxPro icon back to the default foxhead. The main drawback of this method is that other properties of the _SCREEN object are also set back to their defaults. Therefore, _SCREEN.Picture, _SCREEN.Fontname, _SCREEN.Caption, and so on are set back to their defaults. An additional side effect of this is that the Picture and Icon properties of the _SCREEN object will still report the user defined values even though the defaults show up visually (no picture and the foxhead icon). To work around this drawback, you can save the necessary properties of the _SCREEN object in variables, and then restore them after using the MODIFY WINDOW SCREEN command. The following commands can be issued in the Command window to illustrate this:
Workaround TwoCreate a foxhead icon file and set the _SCREEN.Icon property to that icon file. You can change the Fox.bmp bitmap file (located in the VFP directory) to an icon file by using the Imagedit program that comes with the Professional Edition of Visual FoxPro. The main drawbacks for this workaround are that the icon file will not have a transparent background and the resolution isn't as good as the default icon built into Visual FoxPro. Steps to convert the Fox.bmp file to an icon file: 1. Start Imagedit and open the VFP\Fox.bmp file. 2. On the Edit menu in Imagedit, click Copy. 3. On the File menu in Imagedit, click New, and create a new icon file. 4. On the Edit menu, click Paste. In the Paste From Clipboard dialog box,
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been fixed in Visual FoxPro 5.0 for Windows.
MORE INFORMATIONIn FoxPro version 2.x for Windows, the MODIFY WINDOW SCREEN command can be used to set what are now many of the properties of the _SCREEN object. The _SCREEN object is the system memory variable that refers to the Visual FoxPro application window. Some of the _SCREEN properties and the corresponding clauses for the MODIFY WINDOW SCREEN command are:
For more information, please use the Visual FoxPro Help menu and search for
_SCREEN and the MODIFY WINDOW command.
Steps to Reproduce Problem1. Start a new session of Visual FoxPro. If running Visual FoxPro under 2. In the Visual FoxPro Command window, type:
3. Repeat step 1. This time notice that the icon is either a square white
4. In the Visual FoxPro Command window, type the following command to get
KBCategory: kbprg kbbuglist kbfixlist
KBSubcategory: FxprgGeneral VFoxWin buglist3.00 buglist3.00b fixlist5.00
Additional reference words: 3.00 3.00b
|
Last Reviewed: November 1, 1997 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |