C#:使用Window自带函数(如:user32.dll)
[DllImport("user32.dll", EntryPoint = "GetScrollInfo", CallingConvention = CallingConvention.StdCall)]
public static extern bool GetScrollInfo(IntPtr hwnd, int fnBar, ref SCROLLINFO lpsi);
[DllImport("user32.dll", EntryPoint = "SetScrollInfo", CallingConvention = CallingConvention.StdCall)]
public static extern int SetScrollInfo(IntPtr hwnd, int fnBar, [In] ref SCROLLINFO lpsi, bool fRedraw);
[DllImport("User32.dll", CharSet = CharSet.Auto, EntryPoint = "SendMessage", CallingConvention =CallingConvention.Cdecl)]
static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
[DllImport("user32.dll", CharSet = CharSet.Auto, EntryPoint = "PostMessage")]
public static extern bool PostMessage(IntPtr hWnd, uint Msg, int wParam, int lParam);
[DllImport("gdi32.dll")]
public static extern int CreateRoundRectRgn(int x1, int y1, int x2, int y2, int x3, int y3);
[DllImport("user32.dll")]
public static extern int SetWindowRgn(IntPtr hwnd, int hRgn, Boolean bRedraw);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool ShowScrollBar(IntPtr hWnd, int wBar, bool bShow);
[DllImport("user32.dll")]
public static extern IntPtr GetWindowDC(IntPtr hWnd);
[DllImport("user32.dll")]
public static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC);
C#:使用Window自带函数(如:user32.dll)的更多相关文章
- 【整理】c# 调用windows API(user32.dll)
User32.dll提供了很多可供调用的接口,大致如下(转自http://blog.csdn.net/zhang399401/article/details/6978803) using System ...
- C# user32.dll找窗口时,使用GetClass方法解决 【带有系统自动编译的窗体类后缀名】 问题
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] static extern int G ...
- C# user32.dll 找窗口 填数据
工具:SpyLite [DllImport("user32.dll", EntryPoint = "FindWindow")] private extern s ...
- C#中可直接调用WIN32的API函数--USER32.DLL
Win32的API函数可以直接在C#中直接调用,在做WinForm时还是很有帮助的.有时候直接调用Win32的API,可以很高效的实现想要的效果. using System; using System ...
- Winform API "user32.dll"中的函数
命名空间:System.Runtime.InteropServices /// <summary> /// 该函数检索一指定窗口的客户区域或整个屏幕的显示设备上下文环境的句柄,以后可以在G ...
- 整理分享C#通过user32.dll模拟物理按键操作的代码
对系统模拟按键方面的知识和按键映射代码做了一下梳理,在这里分享出来,适用于开发自动操作工具和游戏外挂. 主代码: public const int KEYEVENTF_EXTENDEDKEY = 0x ...
- 【转】c# 调用windows API(user32.dll)
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.R ...
- Python 调用 user32.dll
import ctypes h = ctypes.windll.LoadLibrary("C:\\Windows\\System32\\user32.dll") h.Message ...
- user32.dll
user32.dll中的所有函数 using System; using System.Collections.Generic; using System.Linq; using System.Tex ...
随机推荐
- OpenWrt包管理软件opkg的使用(极路由)
说明: 1.OpenWrt本身系统没什么问题,关键点是一些路由器尝试的限制,比如一些厂商设置成内存分区为只读,那么这个安装软件就变得没什么意义了. 2.opkg的操作有点反人类,正常步骤是查询,安装: ...
- Delphi XE 4,Rad Studio XE 4 官方下载,更新Update 1(附破解)
http://blog.csdn.net/maxwoods/article/details/8842889 XE4 Update1 下载: http://altd.embarcadero.com/do ...
- hashmap实现原理2
put和get都首先会调用hashcode方法,去查找相关的key,当有冲突时,再调用equals(这也是为什么刚开始就重温hashcode和equals的原因)! HashMap基于hashing原 ...
- 使用cwrsync做服务器文件夹同步
首先要下载cwRsync的服务端和客户端软件(4.05免费版),下载地址如下: https://www.itefix.no/i2/cwrsync 具体的配置过程和遇到的问题可参考: http://ww ...
- python使用游标访问数据
游标是一种数据访问对象,可用于在表中迭代一组行或者向表中插入新行.游标有三种形式:搜索.插入或更新.游标通常用于读取现有几何和写入新几何. 每种类型的游标均由对应的 ArcPy 函数(SearchCu ...
- arcgis python图形信息
属性 说明 area 面要素的面积值:对于所有其他要素类型为空 centroid 如果质心位于要素之内或要素之上则为真:否则返回标注点(返回一个点对象) 范围 返回一个范围对象 firstPoint ...
- CloudStack 4.0.2 vRouter导致重启后状态不正常
最近总玩CloudStack + KVM,发现在重启CloudStack服务后,host(kvm)的状态老是为alert.日志里出现如下错误提示: ERROR [agent.manager.Agent ...
- mysql按某一字段分组取最大(小)值所在行的数据
mysql按某一字段分组取最大(小)值所在行的数据 mysql技巧--按某一字段分组取最大(小)值所在行的数据,这是mysql数据库程序员经常用到的在处理一些报表数据时候可以活用!那么猎微网将总结 ...
- c#抓去网页
c#利用WebClient和WebRequest获取网页源代码的比较 2011-11-28 10:26:42 我来说两句 收藏 我要投稿 C#中一般是可以利用WebClient类和WebReq ...
- PowerDesigner概念设计模型(CDM)中的3种实体关系
CDM 是大多数开发者使用PD时最先创建的模型,也是整个数据库设计最高层的抽象.CDM是建立在传统的ER图模型理论之上的,ER图中有三大主要元素: 实体型,属性和联系.其中实体型对应到CDM中的Ent ...