FIX: Can't Restore Default Foxhead Icon After Set Icon PropLast reviewed: October 29, 1997Article ID: 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:
_SCREEN.Icon=HOME()+"samples\graphics\icons\flag\ctrcan.ico" _SCREEN.Picture=HOME()+"fox.bmp" _SCREEN.Fontname="Wingdings" _SCREEN.Fontsize=16 cScrPic=_SCREEN.Picture cScrFont=_SCREEN.Fontname nScrFontsz=_SCREEN.Fontsize * Minimize Visual FoxPro and check the icon. Restore Visual FoxPro. MODIFY WINDOW SCREEN * Minimize Visual FoxPro and check the icon. Restore Visual FoxPro. ? _SCREEN.Picture && this returns the name of the picture file * even though the picture isn't displayed ? _SCREEN.Icon && this returns the name of the icon file even * though the icon is now the default icon ? _SCREEN.Fontname && this should be Arial ? _SCREEN.Fontsize && this should be 10 * The next three commands restore the specified settings: _SCREEN.Picture=cScrPic _SCREEN.Fontname=cScrFont _SCREEN.Fontsize=nScrFontsz 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:
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:
_SCREEN Property MODIFY WINDOW Clause Caption Title Picture Fill File Icon Icon File FontName FontFor more information, please use the Visual FoxPro Help menu and search for _SCREEN and the MODIFY WINDOW command.
Steps to Reproduce Problem
|
KBCategory: kbprg kbbuglist kbfixlist
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |