Messenger/MSGer.tk/Forms/FloatingChatIcon.cs

39 lines
1.1 KiB
C#
Raw Normal View History

2015-07-06 14:29:34 +00:00
using System; //Copyright (c) NorbiPeti 2015 - See LICENSE file
2015-07-06 11:04:54 +00:00
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MSGer.tk
{
public partial class FloatingChatIcon : Form
{
public FloatingChatIcon(ChatPanel cp)
{
InitializeComponent();
}
// defines how far we are extending the Glass margins
private NativeMethods.MARGINS margins;
2015-07-06 11:04:54 +00:00
// uses PInvoke to setup the Glass area.
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (NativeMethods.DwmIsCompositionEnabled())
2015-07-06 11:04:54 +00:00
{
// Paint the glass effect.
margins = new NativeMethods.MARGINS();
2015-07-06 11:04:54 +00:00
margins.Top = -1;
margins.Left = 20;
NativeMethods.DwmExtendFrameIntoClientArea(this.Handle, ref margins);
2015-07-06 11:04:54 +00:00
}
}
}
}