windows setup: remove close button. fixes #1215
This commit is contained in:
parent
e8e48906b3
commit
03ee53490f
|
@ -56,7 +56,13 @@ namespace SparkleShare {
|
||||||
WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
||||||
Content = ContentCanvas;
|
Content = ContentCanvas;
|
||||||
|
|
||||||
|
// Remove the close button
|
||||||
Closing += Close;
|
Closing += Close;
|
||||||
|
SourceInitialized += delegate {
|
||||||
|
WindowInteropHelper helper = new WindowInteropHelper (this);
|
||||||
|
int style = GetWindowLong (helper.Handle, -16);
|
||||||
|
SetWindowLong (helper.Handle, -16, style & ~0×00080000);
|
||||||
|
};
|
||||||
|
|
||||||
this.bar = new Rectangle () {
|
this.bar = new Rectangle () {
|
||||||
Width = Width,
|
Width = Width,
|
||||||
|
@ -70,7 +76,6 @@ namespace SparkleShare {
|
||||||
Fill = new SolidColorBrush (Color.FromRgb (223, 223, 223))
|
Fill = new SolidColorBrush (Color.FromRgb (223, 223, 223))
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
this.side_splash = new Image () {
|
this.side_splash = new Image () {
|
||||||
Width = 150,
|
Width = 150,
|
||||||
Height = 482
|
Height = 482
|
||||||
|
@ -173,5 +178,12 @@ namespace SparkleShare {
|
||||||
{
|
{
|
||||||
args.Cancel = true;
|
args.Cancel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
private extern static int SetWindowLong (IntPtr hwnd, int index, int value);
|
||||||
|
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
private extern static int GetWindowLong (IntPtr hwnd, int index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue