多种形式加上不透明度有帮助。 [英] Multiple forms plus opacity help.

查看:68
本文介绍了多种形式加上不透明度有帮助。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我有4个表格。表格2-4只是存储表格1的首选项。我需要做什么才能使表格4在表格1中进行更改?

这是一个例子:



在表格4上我有一个名为trackBar1的轨道栏



现在,根据轨道栏的值,我想要表格1设置为某种不透明度。这是数学。​​



.Opacity =(trackBar1.Value * 0.01);



但是现在,我只需要在表格之间发送。我做了很多谷歌搜索,这是我的最后一招。谢谢。



编辑:



我忘了提,有没有房产,我可以使一个窗口不能互动 - 如果这是一个单词..我只是想要某个表单不接受任何鼠标点击,我希望它背后的表单接受鼠标点击。

Hello, I have 4 forms. Forms 2-4 are just storing the preferences for form 1. What do I need to do so that form 4 will make changes in form 1?
Here is an example:

On form 4 I have a track bar named "trackBar1"

now, depending on the track bar's value, I want form 1 to be set to a certain opacity. Here is the math.

.Opacity = (trackBar1.Value * 0.01);

But now, i just need to send this between forms. I have done a lot of google searching, and this is my last resort. thanks.



I forgot to mention, is there a property, in which I can make a window not be interact-able - if that's a word.. I just want a certain form to not accept any mouse clicks, i want the form behind it to accept the mouse clicks.

推荐答案

由于这个问题非常受欢迎,我以前的答案常常没有得到很好的理解,可能还不够清楚,我决定写一篇提示/技巧文章,详细的代码示例和解释: 一次回答的许多问题 - Windows窗体或WPF Windows之间的协作



-SA
As the question turned out to be very popular, and my previous answers often were not well understood, probably were not clear enough, I decided to write a Tips/Trick article complete with detailed code samples and explanations: Many Questions Answered at Once — Collaboration between Windows Forms or WPF Windows.

—SA


这篇关于多种形式加上不透明度有帮助。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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