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 ...
随机推荐
- 升级Centos 7/6内核版本到4.12.4的方法
一.查看那系统内核版本 二.升级内核 三.修改grub中默认的内核版本 四.重启系统并查看系统内核 公司打算上Docker服务,目前需要安装运行环境,Docker新的功能除了需要Centos 7系统之 ...
- Spring MVC “404 Not Found”错误的解决
一般这个问题发生的原因不会出在Web.xml配置文件的Servlet URL映射部分,因为这个URL映射做JavaWeb的人经常配置不会发生错误,而且此处的这个映射自由度很大,可以有目录字符串,也可以 ...
- “蝉原则”与CSS3随机多背景随机圆角等效果
一.什么是“蝉原则”? “蝉原则”,英文称作“cicada principle”,是一种让事物的重复出现符合“自然随机性”的规则,为什么这么说呢? “蝉原则”源自于北美,中国似乎并未有这样的说法,这背 ...
- Unity5 assetbundle笔记
Assetbundle api试验----打包选项试验--------结论:BuildAssetBundleOptions说明:------------None: 把所有以来资源到到一个包里----- ...
- SpringCloud实战-Ribbon客户端负载均衡
前面我们已经完成了注册中心和服务提供者两个基础组件.接着介绍使用Spring Cloud Ribbon在客户端负载均衡的调用服务. ribbon 是一个客户端负载均衡器,可以简单的理解成类似于 ngi ...
- c语言常见的几种排序方法总结
一:选择排序和冒泡排序 这两种排序比较简单,直接贴出代码: #include <stdio.h> void choose_sort(int *arr, int n); void bubbl ...
- 许式伟:我与Go语言的这十年[转]
2017-12-18 许式伟 Go中国 2007 年 9 月 20 日,关于设计一门全新语言的讨论正式开始,这门全新的语言,就是后来的 Go.时至今日,Go 语言已经发布到 1.9 版本,走过了整整十 ...
- GMT与Etc/GMT地区信息的时区转换
GMT 地区信息的时区 在将来的版本中可能不再支持以下左面一列中的地区信息的时区.可能从 /usr/share/lib/zoneinfo 删除这些文件.左列中的地区信息的时区用右列中对等的时区来替换. ...
- python爬取365好书中小说
需要转载的小伙伴转载后请注明转载的地址 需要用到的库 from bs4 import BeautifulSoup import requests import time 365好书链接:http:// ...
- 一个相对健壮的node 静态http服务器
先上代码,然后说说坑,算是一个总结,以后在mac上就用这个开启服务调试了,挺好.然后接着想写一个动态的返回页面的,刚好练手mv*的框架. var http = require('http'); var ...