Comments (14)
Unfortunately, the blur effect works ONLY on WindowTypes other than "None". There could be a fix, I am currently seeing what I can improve in this project or fix. But, it's likely that this is something that cannot be fixed and it's a feature by Windows, where only default WindowType/Style is going to be blurred.
from winblur.
Btw, by WindowTypes/Style I meant FormBorderStyle. My bad.
from winblur.
Here's a temporary fix!
(This should be in your form btw)
protected override CreateParams CreateParams
{
get
{
int WS_DLGFRAME = 0x400000;
CreateParams result = base.CreateParams;
result.Style &= ~WS_DLGFRAME;
return result;
}
}
This should allow you to use the Effect while not seeing the default border/title and implementing your own border and top bar. Btw, the FormBorderStyle should not be None, so technically this isn't a fix, but it works. I will still be looking into a way to fix this.
from winblur.
Thanks for your reply! I have now set my FormBorderStyle to Sizeable but I don't quite understand where exactly I should put your fix. Can you please give me a full code example as in my original message?
from winblur.
Here's a code example:
using System;
using System.Windows.Forms;
using WinBlur;
namespace WinBlurTest
{
public partial class Form1 : Form
{
protected override CreateParams CreateParams
{
get
{
int WS_DLGFRAME = 0x400000;
CreateParams result = base.CreateParams;
result.Style &= ~WS_DLGFRAME;
return result;
}
}
public Form1()
{
InitializeComponent();
UI.SetBlurStyle(cntrl: this, blurType: UI.BlurType.Acrylic, designMode: UI.Mode.DarkMode);
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
It should be at the top of the class
from winblur.
Let me know if it works. I noticed that it doesn't ALWAYS work, but let me know. it should look like this:
from winblur.
In my case, the form is just black. In the Designer i set the BackColor to Standart Control
using System;
using System.Drawing;
using System.Windows.Forms;
using WinBlur;
using static WinBlur.UI;
namespace WindowsFormsApp2
{
public partial class Popup : Form
{
protected override CreateParams CreateParams
{
get
{
int WS_DLGFRAME = 0x400000;
CreateParams result = base.CreateParams;
result.Style &= ~WS_DLGFRAME;
return result;
}
}
public Popup()
{
InitializeComponent();
UI.SetBlurStyle(cntrl: this, blurType: UI.BlurType.Acrylic, designMode: UI.Mode.DarkMode);
}
private void Popup_Load(object sender, EventArgs e)
{
}
}
}
from winblur.
I've just noticed that when the Form is focused, everything is black, but when I click anywhere else, it changes its BackColor.
from winblur.
Thing is, I noticed you have to minimize and reopen the form for it to work. Also, perhaps there's a backcolor that's tampering with the color. You might've set the backcolor of a Panel for example as Black. Anyways, if it still doesn't work, then like I said this is a temporary solution. I will be working on a better solution and I'll update the package once I have done it.
from winblur.
The problem now is that even if I remove your fix, the background is still not what it should be. Now it's not even just transparent. Minimising and reopening does not help.
using System;
using System.Drawing;
using System.Windows.Forms;
using WinBlur;
using static WinBlur.UI;
namespace WindowsFormsApp2
{
public partial class Popup : Form
{
public Popup()
{
InitializeComponent();
SetBlurStyle(cntrl: this, blurType: BlurType.Acrylic, designMode: Mode.DarkMode);
}
private void Popup_Load(object sender, EventArgs e)
{
}
}
}
from winblur.
I just realized... Are you on Windows 10?
Dude 😭 This doesn't work on Windows 10. The Blur effects have been introduced in Windows 11 and only a very very few versions of Windows 10. Perhaps the final versions, and even then, you'd have to do some work to enable the Effects. I'm sorry, but it's your OS, not the package.
Your original issue is still valid though, and I am still gonna work on fixing it.
from winblur.
Damn. Thats sad. You should remove the "Windows 10" in your Readme then i guess.
Do you know anything similar that works on Win10?
from winblur.
Well. It does work on Win10, so It's not incorrect. It's just that, it doesn't work on all versions, and you have to enable it most of the time.
And unfortunately there are no blur effects supported on Versions below 10-11, unless you create it yourself via the Form using user controls and code.
from winblur.
Too bad. Good luck then
from winblur.
Related Issues (10)
- Windwos 10 fıx HOT 1
- Mica/Acryl does not work, even on Windows 11 HOT 5
- Light Mode cannot display a matching Fore Color. HOT 4
- Presenting Problems and Suggestions HOT 1
- No longer working? HOT 4
- WinBlur (Windows 10 & Above) HOT 2
- Button Text Not Being Readable HOT 2
- how to Rounded Corners . if i use WinBlur then Rounded not work HOT 1
- Controls are not displayed correctly when HDR is enabled HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from winblur.