I'm attempting to learn C#. (Working with Visual Studio 2015, as a Window Application Project)
I am trying to set the opacity of the main window via a HBar Slider.
I first assumed I would set it as an int (the value of the sidebar), and set the opacity of the window via that value.
I am having issues calling the value of the opacity for the window.
public partial class root : Form
private void Form1_Load(object sender, EventArgs e)
private void sbar_transp_001_Scroll(object sender, ScrollEventArgs e)
sbar_transp_001.Value = Window_Transparency;
root.equals.opacity = Windows_Transparency;
Error CS0119 'object.Equals(object)' is a method, which is not valid in the given context
Remember: Opacity ranges from 0 to 1, so, if your control varies from 0 to 100, you need:
this.Opacity = (trackBar1.Value/100);
(suppose you're using TrackBar control).