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 ...
随机推荐
- access按钮事件在子窗体打开窗体或报表
Private Sub Com1_Click()Me.win.SourceObject = "窗体1"End Sub Private Sub Com2_Click()Me.win. ...
- JVM笔记9-Class类文件结构
1.Class类文件结构 Class 文件是一组以 8 位字节为基础单位的二进制流,各个数据项目严格按照顺序紧凑地排列在 Class 文件之中,中间没有添加任何分隔符,这使得整个 Class 文件中 ...
- Python Django开发中XSS内容过滤问题的解决
from:http://stackoverflow.com/questions/699468/python-html-sanitizer-scrubber-filter 通过下面这个代码就可以把内容过 ...
- Ubuntu硬盘空间清理
1.删除多余的安装下载文件: sudo aptitude autoclean sudo aptitude clean 2.删除多余的内核版本: sudo apt-get autoremove 4.去/ ...
- linux下安装xhprof
https://jingyan.baidu.com/article/a24b33cd7ee1d519ff002b6d.html
- 国内各大支付平台的API地址
1丶目前国内最火的支付平台--蚂蚁金服开放平台(支付宝) https://open.alipay.com/platform/home.htm 2丶国内游戏帝国--腾讯(微信支付) https://pa ...
- 从一个微型例子看“C/C++的内存分配机制”和“数组变量名与指针变量名”(转)
C++的内存有五大分区:堆区.栈区.自由存储区.全局/静态存储区.常量存储区. 五个数据段:数据段.代码段.BSS段.堆.栈 内存分配方式有三种: 从静态存储区域分配.内存在程序编译的时候就已经分配好 ...
- ORACLE 数据库选择性导出表中数据&导入已存在表数据
在dos界面下选择性导出表中的数据语句为: exp his/linker@orcl tables=(sysreprot) file="D:\20131218.dmp" query= ...
- webpack学习之路01
webpack是什么 1.模块化 能将css等静态文件模块化 2.借助于插件和加载器 webpack优势是什么 1.代码分离 各做各的 2.装载器(css,sass,jsx,es6等等) 3.智能解析 ...
- Selenium2Lib库之键盘常用关键字实战
Press Key关键字 按F5 查看Press Key关键字的说明,如下图: Press Key关键字是用于通过键盘模拟由定位器确定的元素的用户按键.‘值’是单个字符,字符串或数值的ASCII码的“ ...