C# 2 forms and opacity question

风格不统一 提交于 2019-12-23 05:43:06

问题


I have 2 forms. on the second form i have a track bar. Whenever that track bar changes it's value, I want form 1 to become transparent. My code.

opacitytrackBar1.ValueChanged += new EventHandler(opacitytrackBar1_ValueChanged);

but what is the code for setting form1's opacity? thanks!


回答1:


Are you after the .Opacity property on the form object? http://msdn.microsoft.com/en-us/library/system.windows.forms.form.opacity(v=VS.80).aspx




回答2:


Check this sites:

Fading Windows Form in C#

Transparency Tutorial with C# - Part 3

Transparent forms (form opacity)

Regards



来源:https://stackoverflow.com/questions/7250820/c-sharp-2-forms-and-opacity-question

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!