Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/264.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# MessageBox没有';在Windows7嵌入式系统中不显示_C#_.net_Windows Embedded_Windows 7 Embedded - Fatal编程技术网

C# MessageBox没有';在Windows7嵌入式系统中不显示

C# MessageBox没有';在Windows7嵌入式系统中不显示,c#,.net,windows-embedded,windows-7-embedded,C#,.net,Windows Embedded,Windows 7 Embedded,考虑一个消息框来提示用户回答是或否。它适用于我们的XP机器和一台Windows7构建机器 然而,它不能在我们的Windows7嵌入式机器上工作。没有错误消息,没有显示消息框。它只是假设用户单击了Yes按钮,因为我可以找到从那里创建的调试文件,并且createDatabase()时,前面没有任何messageBox 我可以找到MessageBox所需的程序集(System.Windows.Forms.dll)。它与我们的Windows 7构建计算机位于同一位置。你知道为什么吗?谢谢 DialogR

考虑一个消息框来提示用户回答是或否。它适用于我们的XP机器和一台Windows7构建机器

然而,它不能在我们的Windows7嵌入式机器上工作。没有错误消息,没有显示消息框。它只是假设用户单击了Yes按钮,因为我可以找到从那里创建的调试文件,并且
createDatabase()时,前面没有任何messageBox

我可以找到MessageBox所需的程序集(System.Windows.Forms.dll)。它与我们的Windows 7构建计算机位于同一位置。你知道为什么吗?谢谢

DialogResult result = System.Windows.Forms.MessageBox.Show(
    "Do you want to update your database?\nWarning: All your data will be erased if you click Yes !",
"Update Database",
MessageBoxButtons.YesNo,
MessageBoxIcon.Question);

if (result == DialogResult.Yes)
{
    string[] cmdLines2 = { @"C:\AndeDB\AndeDB.db is here and selected yes" };
    //it will create, open and write or overwrite
    File.WriteAllLines(@"C:\Temp\dbcheck2.txt", cmdLines2);
    createDatabase();
}
在post中,您可以从Windows7中禁用“消息框默认回复”组件。有关更多详细信息,请访问。

此处的关键字为“嵌入式”。这些版本的Windows通常配置为无头运行(无监视器),或优化为在无人靠近的情况下工作。MessageBox对这种配置是有害的。机器停止运转,没有人能找出原因


您需要返回到系统生成器并找到控制此操作的选项。

您可以分享Windows XP的解决方案吗?