Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
hexadecimal233 committed Feb 8, 2021
1 parent b61f5a8 commit 4035b9e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Windows Store Downloader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down
23 changes: 15 additions & 8 deletions code/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -173,15 +174,20 @@ private void Form1_Load(object sender, EventArgs e)
{
this.TransparencyKey = Color.FromArgb(0xf1f1f0);//R不等于B
RefreshForm();
Acrylic.setBlur(this.Handle, 0x30f2f2f2);//亚克力效果
SetBlur1(this.Handle, 0x3FFFFFFF);//亚克力效果
}//WIN10亚克力





}

private void SetBlur1(IntPtr hWnd,int gradientColor)
{
if (File.Exists("acrylic.dll") == false)
{
MessageBox.Show("acrylic.dll not found.Please put the dll to current directory." +
"\n无法找到acrylic.dll。请把它放到当前目录。");
Environment.Exit(0);
}
Acrylic.SetBlur(hWnd, gradientColor);
}//容错dll
private void Chinese_Lang()
{
Language.Chinese_Lang();
Expand Down Expand Up @@ -404,7 +410,8 @@ class User32
}//淡入淡出
class Acrylic
{
[DllImport("acrylic")]
public static extern void setBlur(IntPtr hWnd, int gradientColor);

[DllImport("acrylic", CharSet = CharSet.Auto, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetBlur(IntPtr hWnd, int gradientColor);
}
}
Binary file modified resources/acrylic.dll
Binary file not shown.

0 comments on commit 4035b9e

Please sign in to comment.