C# WinForm ShowInTaskbar Api Version
using System;
using System.Runtime.InteropServices; namespace x
{
unsafe class NativeWindow
{
/*
* Window field offsets for GetWindowLong()
*/
public const int GWL_WNDPROC = (-);
public const int GWL_HINSTANCE = (-);
public const int GWL_HWNDPARENT = (-);
public const int GWL_STYLE = (-);
public const int GWL_EXSTYLE = (-);
public const int GWL_USERDATA = (-);
public const int GWL_ID = (-); public const int GWLP_WNDPROC = (-);
public const int GWLP_HINSTANCE = (-);
public const int GWLP_HWNDPARENT = (-);
public const int GWLP_USERDATA = (-);
public const int GWLP_ID = (-); /*
* ShowWindow() Commands
*/
public const int SW_HIDE = ;
public const int SW_SHOWNORMAL = ;
public const int SW_NORMAL = ;
public const int SW_SHOWMINIMIZED = ;
public const int SW_SHOWMAXIMIZED = ;
public const int SW_MAXIMIZE = ;
public const int SW_SHOWNOACTIVATE = ;
public const int SW_SHOW = ;
public const int SW_MINIMIZE = ;
public const int SW_SHOWMINNOACTIVE = ;
public const int SW_SHOWNA = ;
public const int SW_RESTORE = ;
public const int SW_SHOWDEFAULT = ;
public const int SW_FORCEMINIMIZE = ;
public const int SW_MAX = ; [DllImport("user32.dll")]
public static extern IntPtr GetTaskmanWindow(); [DllImport("user32.dll")]
public static extern IntPtr SendMessageA(
[In] IntPtr hWnd,
[In] int Msg,
[In] IntPtr wParam,
[In] IntPtr lParam
); [DllImport("user32.dll")]
public static extern int SetWindowLongA(
[In] IntPtr hWnd,
[In] int nIndex,
[In] int dwNewLong
); [DllImport("user32.dll")]
public static extern IntPtr SetWindowLongPtrA(
[In] IntPtr hWnd,
[In] int nIndex,
[In] IntPtr dwNewLong
); [DllImport("user32.dll")]
public static extern bool ShowWindow(
[In] IntPtr hWnd,
[In] int nCmdShow
); private IntPtr _hWnd;
private bool _bShowInTaskbar; public bool ShowInTaskbar
{
get { return _bShowInTaskbar; } set
{
if (value)
{
SetWindowLongCore(_hWnd, GWLP_HWNDPARENT, GetTaskmanWindow());
}
else
{
SetWindowLongCore(_hWnd, GWLP_HWNDPARENT, (IntPtr));
}
SendMessageA(hwndroot, WM_SETREDRAW, (IntPtr), (IntPtr));
ShowWindow(hwndroot, SW_HIDE);
ShowWindow(hwndroot, SW_SHOW);
SendMessageA(hwndroot, WM_SETREDRAW, (IntPtr), (IntPtr));
_bShowInTaskbar = value;
}
} public NativeWindow() { } public static IntPtr SetWindowLongCore(IntPtr hWnd, int nIndex, IntPtr dwNewLong)
{
if (sizeof(void*) == )
{
return (IntPtr)SetWindowLongA(hWnd, nIndex, (int)dwNewLong);
}
return SetWindowLongPtrA(hWnd, nIndex, dwNewLong);
} }
}
C# WinForm ShowInTaskbar Api Version的更多相关文章
- Android开发学习---template requires a minimum SDK version of at least 7,build target API version of 14
adt 22.6.3的bug 当adt更新到22.6.3,其编辑器中最低支持api7,即android 2.1,这里可能是google故意这么做的,也可能是其bug.其target sdk 和comp ...
- SingleThreadModel is deprecated in Servlet API version 2.4
Ensures that servlets handle only one request at a time. This interface has no methods. If a servlet ...
- docker报Error response from daemon: client is newer than server (client API version: 1.24, server API version: 1.19)
docker version Client: Version: 17.05.0-ce API version: 1.24 (downgraded from 1.29) Go version: go1. ...
- RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
两个python,一个是本机自带的,一个是anaconda.先前呢,用自带的安装了Opencv,由于自带的python,对应的numpy版本是13, 而anaconda对应的版本是12,导致impor ...
- 记一次安装kolla遇到DockerException: Error while fetching server API version: Timeout value connect was Timeout的问题
1)环境信息: docker版本:17.09,当docker的版本是12.06时,也会报这个错误 [root@localhost ~]# docker --version Docker version ...
- Xdebug bad Zend API Version Number
I am having trouble upgrading xdebug for MAMP. I was running version 2.2.0 and there was a known iss ...
- 利用swagger和API Version实现api版本控制
场景: 在利用.net core进行api接口开发时,经常会因为需求,要开发实现统一功能的多版本的接口.比如版本V1是给之前用户使用,然后新用户有新需求,这时候可以单独给这个用户写接口,也可以在V1基 ...
- WinForm 窗体API移动 API阴影
窗体移动 //窗体移动API [DllImport("user32.dll")] public static extern bool ReleaseCapture(); [DllI ...
- RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9
之前测试安装好Theano之后就去安装Tensorflow,然后再回来执行Theano的测试语句的时候,就出现以下错误了: google了一下,尝试了一下解决方法 import numpy print ...
随机推荐
- Java/JSP/JS Debug笔记
2006年的blog,当时好生涩啊: ------------------------ 谨以此文献给我没有头绪或心劲去debug的日子和很多辛苦debug的同志们. 应部门一个科的需求,给他们写一个夜 ...
- Visual Studio 2017 15.7 下的.NET Core
Visual Studio 2017 15.7版本发布,对.NET Core项目的主要相关改变如下, 同时对Xamarin.Android和iOS项目的支持上也做了较大改进. 一. .NET Core ...
- 帧同步(LockStep)该如何反外挂
在中国的游戏环境下,反挂已经成为了游戏开发的重中之重,甚至能决定一款游戏的生死,吃鸡就是一个典型的案例.目前参与了了一款动作射击的MOBA类游戏的开发,同步方案上选择了帧同步技术(LockStep而非 ...
- DDGScreenShot —图片加各种滤镜高逼格操作
写在前面 图片加各种滤镜操作,当然苹果给开发者提供了相关的api和封装, 大部分开发者感觉这是这是晦涩难懂的,接下来就让我们来了解一下, 其实也没有那么深不可测. 代码如下(每一步已经解释的很详细) ...
- 多层嵌套的json数据
很多时候我们见到的json数据都是多层嵌套的,就像下面这般: {"name":"桔子桑", "sex":"男", , & ...
- java集合的contains(obj)方法的实现
在实际项目中我们通常会有一个需求就是:想知道在一个列表中是否包含某一个对象 这里ArrayList表.HashSet表和HashMap表都提供了一个contains(obj)方法, 下面说一下两个列表 ...
- java书写、数据类型、数组定义
这里只记录java与php.javascript不同的地方,相同的地方就不赘述了. 1.java文件源码为以.java为后缀的文件,字节码文件是以.class为后缀的文件. 2.写好一个java源码之 ...
- SQLServer 导入大脚本文件
1.cmd 你懂的 2.这里呢得引入一下OSQL,先看看帮助文档:osql -? 3.osql -E -i C:\Users\DNT\Desktop\BigValues.sql-E 表示使用 Wind ...
- 使用 GNU profiler 来提高代码运行速度
各种软件对于性能的需求可能会有很大的区别,但是很多应用程序都有非常严格的性能需求,这一点并不奇怪.电影播放器就是一个很好的例子:如果一个电影播放器只能以所需要速度的 75% 来播放电影,那么它几乎就没 ...
- 关于ConcurrentSkipListMap的理解
一.前言 JCIP 提到了在 Java 6 中引入了两个新的并发集合类 ConcurrentSkipListMap 和 ConcurrentSkipListSet.其实只要介绍一下 Concurren ...