Change the transparency of the window when opening a form

I am trying to automatically change the opacity of a form before loading. I use the built-in "Settings" function to save the transparency value that the window should have. The problem is that when I debug my application, everything works well, when I compile it and try to open the executable file, the window just disappears ... I don't get any errors.

Here is how I do it:

First, there is a value in the settings called opacity (int) from 0-100

    private void Form1_Load(object sender, EventArgs e)
    {
        this.Opacity = WindowsFormsApplication1.Properties.Settings.Default.opacity * 0.01;
    }
+3
source share
2 answers

. .

, , exe release. , 0, .

+2

, 1.0 , 0.0 - . , 1.0, .


ok, ... , , 0,5 .

+1

Source: https://habr.com/ru/post/1770739/


All Articles