简体   繁体   English

按钮显示错误的远程桌面应用程序

[英]remote desktop application with wrongly displayed buttons

I have a winform within a remote desktop application that is built dynamically with a container panel for a toolbar with large (regular) buttons. 我在远程桌面应用程序中有一个winform,该应用程序是使用带有大(常规)按钮的工具栏的容器面板动态构建的。 The application is writen in C# and .NET 4.0. 该应用程序是用C#和.NET 4.0编写的。 The application is viewed as it should only if I do not maximize the window (meaning restored view is fine). 仅当我没有最大化窗口时才应查看该应用程序(这意味着恢复的视图很好)。

Now, after RDP login - within most client computers - the application looks fine (even when we maximize and restoring). 现在,在大多数客户端计算机中,在RDP登录之后,该应用程序看起来正常(即使我们最大化和还原)。 Within low resolution client computers (800x600), the buttons on the toolbar are not displayed in the right position (such as in the 1024x768 clients). 在低分辨率客户端计算机(800x600)中,工具栏上的按钮未显示在正确的位置(例如在1024x768客户端中)。

I used double buffering and it didn't help... the problem may or may not be depended on the screen resolution (it can be memory issue or something). 我使用了双重缓冲,但并没有帮助...问题可能取决于屏幕分辨率(可能是内存问题或其他)。 It is not a problem of localization layout. 这不是本地化布局的问题。

The following image shows the Fine and Bad states: http://imgur.com/gO4UJ,v7O9K 下图显示了良好和不良状态: http : //imgur.com/gO4UJ,v7O9K

What can I do to resolve this issue? 我该怎么做才能解决这个问题?

OK, so in case anybody gets to this kind of case, this is the thing that made the issue: 好的,所以如果有人遇到这种情况,这就是问题所在:

In the form, there was an empty repaint override. 在窗体中,有一个空的重绘替代。 The programmer that created the form was overriding the repaint with an empty method (don't know why, I guess I'll ask my team for the business logic). 创建表单的程序员正在用一个空方法覆盖重绘(不知道为什么,我想我会向我的团队询问业务逻辑)。

How did I reproduce it in the development environment? 我如何在开发环境中复制它? Following Albin Sunnanbo's note, I ran the RDP application in minimized version during initialization, and I noticed that it occurs with large resolution clients also in this use case... So, I know repaint occurs while performing a window resize - and this made me suspicious about the method... 按照Albin Sunnanbo的说明,我在初始化过程中以最小化版本运行RDP应用程序,并且我注意到在这种用例中它也发生在大型客户端上...因此,我知道在执行窗口调整大小时会发生重绘-这使我怀疑该方法...

==> On a side note, I guess this is why inheritance is so bad, and going on to WPF is better. ==>顺便说一句,我想这就是为什么继承如此糟糕,而继续使用WPF更好的原因。 It took me 3 days to understand why this issue occurred. 我花了三天的时间来了解为什么会发生此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从Silverlight应用程序启动远程桌面 - Launch Remote Desktop from Silverlight Application C#以管理员身份运行远程桌面应用程序 - C# Run Remote Desktop Application as Administrator 自动更新通过远程桌面使用的Winform应用程序 - Auto Updating Winform Application Used Over Remote Desktop Windows应用程序或服务,用于与远程桌面上的另一个服务进行通信 - Windows application or service to communicate with another service on remote desktop WPF应用程序无法处理远程桌面分辨率更改 - WPF application unable to handle remote desktop resolution change 如果远程桌面最小化或关闭c#窗体应用程序已停止 - If Remote Desktop minimize or close c# form application stopped 具有远程Web UI(如utorrent)的桌面WPF应用程序 - Desktop WPF Application with remote Web UI like utorrent C#更好的压缩远程桌面广播应用程序 - C# better compression for remote desktop broadcast application 检查应用程序是否在终端服务下而不是远程桌面下运行 - Check whether application is running under Terminal Services as opposed to Remote Desktop 框架 3.5 桌面应用程序中的“远程服务器返回错误:(404)” - "The remote server returned an error: (404)" in desktop application for framework 3.5
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM