C#问题中的自定义形状的Windows窗体 [英] Custom Shaped Windows Forms in c# problem

查看:67
本文介绍了C#问题中的自定义形状的Windows窗体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了Windows应用程序.我把矩形图片作为表格的背景图片.在该图片中,矩形外部为红色.在我的表单中,我将该颜色设置为透明色,因此它将仅显示该矩形或任何其他形状作为表单.

它可以在我自己的计算机上很好地工作,但是每当我尝试在另一台也安装有.Net框架的计算机上使用它时,颜色都不会隐藏并且透明度不起作用.它同时显示矩形和背景色.我该怎么办?

我在Visual Studio中使用C#.该应用程序是用.Net 2.0编写的.

I have developed a windows application. I put a rectangle picture as a background pic for my form. In that pic, outside the rectangle, it is colored red. In my form I set that color as the tranparency color so it would show only that rectangle or any other shape as a form.

It works well in my own computer, but whenever I try to use it in another computer which also has the .Net framework installed there, the color does not hide and the transparency does not work. It shows both the rectangle and the backgroung color. What should i do?

I''m using C# in a Visual studio. The application is written in .Net 2.0.

推荐答案

这台其他计算机具有什么颜色深度/分辨率?我想知道这是否是显示驱动程序问题.如果应用程序运行,则没有理由使其无法按预期运行.
What color depth/resolution does this other computer have ? I wonder if it''s a display driver issue. If the app runs, then there''s no reason for it to not work as expected.


目标计算机上的分辨率相同,尽管我认为分辨率不能达到问题,我想我可能是框架,但是我在那台计算机上安装了相同版本的点网框架,我不知道问题出在哪里.无论如何,谢谢您的回答.我仍在寻找解决问题的答案.
the resolution on the destination computer is the same,though i think that the resolution cannot be the problem,i think i might be the framework,but i installed the same version of the dot net framework on that computer,i have no idea where''s the problem.any way thanks for the answer.I''m still looking for the answer to solve the problem.


这篇关于C#问题中的自定义形状的Windows窗体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆