在某些情况下,LinkLabel宽度不够

问题描述

env:Windows Server 2008 R2 x64上的VS2019 16.6.3

复制步骤:

  1. 创建一个普通的.net4.0 winform项目
  2. CheckBox上拖动Form1
  3. 添加新表单(自动名称Form2
  4. LinkLabel上拖动两个Label一个Form2,确保z顺序为:linkLabel1linkLabel2label1
  5. linkLabel1linkLabel2字体设置为Arial,10.5pt
  6. Load注册Form2事件,编写代码: @H_502_44@linkLabel2.Text = string.Empty; linkLabel1.Text = "<未选择>"; linkLabel2.Text = "<未选择>";
  7. 修改Main方法内容以遵循program.cs中的代码: @H_502_44@Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); new Form1().ShowDialog(); Application.Run(new Form2());
  8. F5关闭Form1,现在您可以看到linkLabel1的宽度不够

demo.zip

enter image description here

我确实向Developer Community报告过,但是根据我过去的经验,他们更喜欢close,所以我也决定在此发布。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)