Windows 10 Creators更新打破了WinForms应用程序/ BSOD
发布时间:2020-12-14 05:34:11 所属栏目:Windows 来源:网络整理
导读:在复杂的WinForms应用程序中有多个层时,Windows 10 Creators崩溃.可以使用下面的代码轻松复制.当悬停或点击 = 40层之上的UI时,系统会因BSOD而崩溃.它应该碰到一个例外. 有没有人知道调整以避免完全崩溃? 码: using System;using System.Collections.Generi
在复杂的WinForms应用程序中有多个层时,Windows 10 Creators崩溃.可以使用下面的代码轻松复制.当悬停或点击> = 40层之上的UI时,系统会因BSOD而崩溃.它应该碰到一个例外.
有没有人知道调整以避免完全崩溃? 码: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace PanelLayers { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender,EventArgs e) { int maxCount = 45; int count = 0; this.CreateLayers(this,maxCount,ref count); } private void CreateLayers(Control BaseControl,int MaxCount,ref int Count) { if(Count == MaxCount) { Button btn = new Button(); btn.Text = "Click me"; btn.Location = new Point(8,8); btn.Click += btn_Click; BaseControl.Controls.Add(btn); } else { Count++; Panel pnl = new Panel(); pnl.Dock = DockStyle.Fill; try { BaseControl.Controls.Add(pnl); this.CreateLayers(pnl,MaxCount,ref Count); } catch(Exception ex) { MessageBox.Show(String.Format("Exception hit at count {0}{1}{2}{1}{3}",Count,Environment.NewLine,ex.Message,ex.StackTrace)); } } } void btn_Click(object sender,EventArgs e) { MessageBox.Show("Hello Creators Update!"); this.Close(); } } } 解决方法
看起来它可能与Windows 8 / Windows Server 2012上的另一个问题(相同?)有关.请参阅
here.
更新 Microsoft提供了修复程序:https://support.microsoft.com/en-us/help/4022716/windows-10-update-kb4022716 这是它的描述:
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- Windows XP SP3上的Tbutton令人讨厌的Png(XP模式Windows 7)
- 什么类型的应用程序启动得更快:Windows窗体或WPF?
- windows-server-2008 – 选择Windows Small Biz Server版本
- wpf – 当Windows检测到应用程序挂起时记录堆栈跟踪
- windows – 通缉:WinAPI调用记录器
- windows-phone-7 – 如何在Windows Phone 7中获取Wi-Fi和移
- Windows – 如何在远程PC上执行dos命令?
- windows – 如何为单台机器添加多个私有IP地址?
- 有没有办法在Microsoft Azure存储资源管理器或Azure门户中查
- 从Windows 8批量删除Features On Demand有效负载?
推荐文章
站长推荐
热点阅读