BUG: SaveFileDialog.showDialog() Fails at Head of Empty if BlockID: Q194772
|
The Save File dialog box does not appear when a SaveFileDialog.showDialog() call is placed in the conditional expression of an if statement that is followed by an empty if code block.
Place a line of code in the if block or following the if statement such as the following:
if(...)
int localint = 0;
-or-
if(...) {
int localint = 0;
}
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.This bug was corrected in Virtual Machines 3165 and later.
import com.ms.wfc.ui.*;
import com.ms.win32.*;
public class SFDialogTest
{
public static void main(String args[]) {
SaveFileDialog sfd = new SaveFileDialog();
if (sfd.showDialog() == DialogResult.OK) {
//int localint = 0;
}
String message = "SaveFileDialog should have been shown by now.";
message += "\r\n";
message += "If not, Uncomment the \"int localint = 0;\" line ";
message += "to make it work.";
User32.MessageBox(0,
message,
"Message Box",
MessageBox.OK);
}
}
For additional information regarding Visual J++ 6.0, visit the following Web site:
http://msdn.microsoft.com/visualj/
© Microsoft Corporation 1999, All Rights Reserved.
Contributions by Robert LaCasse, Microsoft Corporation
Additional query words:
Keywords : kbSDKJava kbVJ kbVJ600bug kbWFC
Version : WINDOWS:3.1,6.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: July 14, 1999