[remove] 移除将窗口从Alt Tab中隐藏的代码
This commit is contained in:
parent
67fe09c7fd
commit
c229e2503d
@ -151,19 +151,7 @@ namespace Ink_Canvas {
|
||||
public static string settingsFileName = "Settings.json";
|
||||
bool isLoaded = false;
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
static extern int GetWindowLong(IntPtr hWnd, int nIndex);
|
||||
[DllImport("user32.dll")]
|
||||
static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
|
||||
private const int GWL_EX_STYLE = -20;
|
||||
private const int WS_EX_APPWINDOW = 0x00040000, WS_EX_TOOLWINDOW = 0x00000080;
|
||||
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e) {
|
||||
|
||||
var helper = new WindowInteropHelper(this).Handle;
|
||||
//Performing some magic to hide the form from Alt+Tab
|
||||
SetWindowLong(helper, GWL_EX_STYLE, (GetWindowLong(helper, GWL_EX_STYLE) | WS_EX_TOOLWINDOW) & ~WS_EX_APPWINDOW);
|
||||
|
||||
loadPenCanvas();
|
||||
//加载设置
|
||||
LoadSettings(true);
|
||||
|
@ -17,6 +17,7 @@ namespace Ink_Canvas {
|
||||
public RandWindow() {
|
||||
InitializeComponent();
|
||||
AnimationsHelper.ShowWithSlideFromBottomAndFade(this, 0.25);
|
||||
BorderBtnHelp.Visibility = RandIsDisplayListManageButton == false ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
|
||||
public RandWindow(bool IsAutoClose) {
|
||||
@ -24,6 +25,7 @@ namespace Ink_Canvas {
|
||||
isAutoClose = IsAutoClose;
|
||||
PeopleControlPane.Opacity = 0.4;
|
||||
PeopleControlPane.IsHitTestVisible = false;
|
||||
BorderBtnHelp.Visibility = RandIsDisplayListManageButton == false ? Visibility.Collapsed : Visibility.Visible;
|
||||
|
||||
new Thread(new ThreadStart(() => {
|
||||
Thread.Sleep(100);
|
||||
@ -64,6 +66,7 @@ namespace Ink_Canvas {
|
||||
public int RandWaitingThreadSleepTime = 5;
|
||||
public int RandMaxPeopleOneTime = 10;
|
||||
public int RandDoneAutoCloseWaitTime = 2500;
|
||||
public bool RandIsDisplayListManageButton = false;
|
||||
|
||||
private void BorderBtnRand_MouseUp(object sender, MouseButtonEventArgs e) {
|
||||
Random random = new Random();// randSeed + DateTime.Now.Millisecond / 10 % 10);
|
||||
|
Loading…
Reference in New Issue
Block a user