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的更多相关文章

  1. 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 ...

  2. 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 ...

  3. 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. ...

  4. RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa

    两个python,一个是本机自带的,一个是anaconda.先前呢,用自带的安装了Opencv,由于自带的python,对应的numpy版本是13, 而anaconda对应的版本是12,导致impor ...

  5. 记一次安装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 ...

  6. 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 ...

  7. 利用swagger和API Version实现api版本控制

    场景: 在利用.net core进行api接口开发时,经常会因为需求,要开发实现统一功能的多版本的接口.比如版本V1是给之前用户使用,然后新用户有新需求,这时候可以单独给这个用户写接口,也可以在V1基 ...

  8. WinForm 窗体API移动 API阴影

    窗体移动 //窗体移动API [DllImport("user32.dll")] public static extern bool ReleaseCapture(); [DllI ...

  9. RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9

    之前测试安装好Theano之后就去安装Tensorflow,然后再回来执行Theano的测试语句的时候,就出现以下错误了: google了一下,尝试了一下解决方法 import numpy print ...

随机推荐

  1. access窗口标签居中

    Private Sub Form_Resize() On Error Resume Next Me.Width = Me.InsideWidth Me.Section(acDetail).Height ...

  2. selenium获取百度账户cookies

    [效果图] 效果图最后即为获取到的cookies,百度账户的cookies首次获取,需要手动登录,之后就可以注入cookies,实现免密登录. [代码] public class baiduCooki ...

  3. truffle 安装以及基本指令

    1. linux下安装方式 $ npm install -g truffle 环境要求: NodeJS 5.0+ Windows,Linux,或Mac OS X 2. 创建工程: $ mkdir te ...

  4. Mybatis 系列3

    系列文章 2 中,我们通过对mybatis源码的简单分析,可看出,在mybatis配置文件中,在configuration根节点下面,可配置properties.typeAliases.plugins ...

  5. C++ 延时等待(sleep/timer/wait)

    原文链接:http://blog.csdn.net/tangweide/article/details/7063747 (-)使用_sleep()函数 #include <iostream> ...

  6. PhpStorm服务激活

    日期 服务地址 状态  2018-03-15  http://idea.singee77.com/  使用中

  7. C++位运算

    移位运算 要点 1 它们都是双目运算符,两个运算分量都是整形,结果也是整形.     2 " < <" 左移:右边空出的位上补0,左边的位将从字头挤掉,其值相当于乘2. ...

  8. python中的类

    以下内容是python tutorial的读书笔记: 一.命名空间的分层 二.local赋值语句,nonlocal和global的区别 local赋值语句,它是无法实现对于最里层的作用域的重新绑定的 ...

  9. 微信小程序-设计指南

    基于微信小程序轻快的特点,官方拟定了小程序界面设计指南和建议,可作为小程序开发参考. 友好礼貌 -避免用户使用服务时被周围环境干扰,设计时应减少无关设计对用户的影响,礼貌的向用户提供服务,友好的引导用 ...

  10. ES2015也就是ES6知识点持续更新

    ES6,全名:ECMAScript2015,先扯点其他的,ECMA是一个国际标准化组织,它最重要最重要的作用就是让ECMAScript这门语言标准化,什么意思呢?我们知道,js这门脚本语言是运行在浏览 ...