我在datagridview中有一个复选框,该复选框未呈现/可见,并且可以在某些远程桌面会话中与之进行交互 - 我如何修复它?

发布于 2025-02-12 07:46:11 字数 437 浏览 0 评论 0原文

环境

RDP目标:Windows 2016 Hyper-V服务器

RDP客户端:Windows 10

客户端监视器:1920x1080 150%缩放。

应用

C ++/MFC带有产卵(通过COM)C#Winform,显示具有许多控件的数据网格视图,包括单元格中的复选框。

C#.NET 4.6/4.7

问题

复选框在显示时根本不会呈现。如果RDP目标是本地Hyper-V中的Windows 10客户端,则不会发生。

使用任何监视器作为RDP会话主机,而不是100%或125%的主机出现问题。 问题以任何分辨率发生。

进行解决方法

  • 使用具有100%缩放的监视器或缩放率125%的监视器
  • 。在目标服务器内部,将应用程序设置为在兼容模式下使用8位颜色

Environment

RDP Target: Windows 2016 Hyper-V Server

RDP Client: Windows 10

Main Monitor of client: 1920x1080 150% scaling.

Application

C++/MFC with spawned (via COM) C# Winform, showing a Data Grid View with a number of controls, including checkboxes in cells.

C# .NET 4.6/4.7

Problem

The Checkbox does not render at all when shown. Does not happen if the RDP target is a Windows 10 client in a local Hyper-V.

Using any monitor as the RDP session host which is not 100% or 125% exhibits the problem.
Problem happens at any resolution.

Workarounds

  • Using a monitor with 100% scaling, or 125% scaling.
  • Inside the target server, set the application to use 8bit colour in compatibility mode

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我不会写诗 2025-02-19 07:46:11

问题是行高度固定而太小。复选框无法绘制。

以下代码解决了它。

grid.autosizerowsmode = System.Windows.Forms.DatagridViewAutoSizerOwsMode.disPlayedCells;

The problem was that the row height was fixed, and too small. The checkbox was unable to draw.

The following line of code solved it.

grid.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.DisplayedCells;

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文