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

  1. 【整理】c# 调用windows API(user32.dll)

    User32.dll提供了很多可供调用的接口,大致如下(转自http://blog.csdn.net/zhang399401/article/details/6978803) using System ...

  2. C# user32.dll找窗口时,使用GetClass方法解决 【带有系统自动编译的窗体类后缀名】 问题

    [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] static extern int G ...

  3. C# user32.dll 找窗口 填数据

    工具:SpyLite [DllImport("user32.dll", EntryPoint = "FindWindow")] private extern s ...

  4. C#中可直接调用WIN32的API函数--USER32.DLL

    Win32的API函数可以直接在C#中直接调用,在做WinForm时还是很有帮助的.有时候直接调用Win32的API,可以很高效的实现想要的效果. using System; using System ...

  5. Winform API "user32.dll"中的函数

    命名空间:System.Runtime.InteropServices /// <summary> /// 该函数检索一指定窗口的客户区域或整个屏幕的显示设备上下文环境的句柄,以后可以在G ...

  6. 整理分享C#通过user32.dll模拟物理按键操作的代码

    对系统模拟按键方面的知识和按键映射代码做了一下梳理,在这里分享出来,适用于开发自动操作工具和游戏外挂. 主代码: public const int KEYEVENTF_EXTENDEDKEY = 0x ...

  7. 【转】c# 调用windows API(user32.dll)

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.R ...

  8. Python 调用 user32.dll

    import ctypes h = ctypes.windll.LoadLibrary("C:\\Windows\\System32\\user32.dll") h.Message ...

  9. user32.dll

    user32.dll中的所有函数 using System; using System.Collections.Generic; using System.Linq; using System.Tex ...

随机推荐

  1. [转].net reactor 学习系列(二)---.net reactor界面各功能说明

    安装了.net reactor之后,可以在安装目录下找到帮助文档REACTOR_HELP.chm,目前没有中文版本,里面详细介绍了.net reactor的各功能及使用场景.本系列文章是基于此帮助文档 ...

  2. Andorid之Annotation框架初使用(三)

    线程使用: @Background这个是使用了cached thread pool executor , 阻止开启过多的线程 可以为@Background指定一个id,用于随时终止线程的操作(Back ...

  3. 网页采集(通过HtmlAgilityPack+XPath)

    有HtmlAgilityPack这个类库可以更方便地对HTML内容进行分析和提取.因此今天特别学习和实践了一下HtmlAgilityPack和XPath,并作下笔记. 1.下载HtmlAgilityP ...

  4. 一个Loading 遮罩效果

    1.需要两个DIV,一个用来遮罩,另一个用来显示Loading图片和文字(初始时它们是隐藏的) .gdiv_over { display: none; position: absolute; top: ...

  5. java怎么删除List中的指定元素

    ArrayList al = new ArrayList(); al.add("a"); al.add("b"); //al.add("b" ...

  6. 数据库插入数据返回当前自增主键ID值的方法

    当我们插入一条数据的时候,我们很多时候都想立刻获取当前插入的主键值返回以做它用.我们通常的做法有如下几种: 1. 先 select max(id) +1 ,然后将+1后的值作为主键插入数据库: 2. ...

  7. spring+mybatis 多数据源切换

    摘自: http://www.oschina.net/code/snippet_347813_12525 1. 代码: DbContextHolder public class DbContextHo ...

  8. Thinkpad X201 Gobi2000 上电信3G网络

    网上的教程大多有点小问题,许多都不完整,今天放出系统化.理论化的设置方法,附送上所有软件. 一.本教程适用范围:1.gobi 2000 正式版 FRU:60Y3263 (带MEID.IMEI)2.- ...

  9. 微信公众帐号开发教程第4篇-----开发模式启用及接口配置Java

    欢迎加入群:347245650   345531810 进行讨论相互交流  我的微信号:572839485 我的微信公众账号  我的微社区欢迎关注 索取源码←请点击 图床:没有服务器 拖拽图片 外网即 ...

  10. 实现一个类似Chrome新功能提示的popoup

    先让我们看一下Chrome的popup是什么样的: 这个“直接搜索网页”与“在打开的标签页之间切换”就是两个功能导航,还做了一个动画效果,会不停的上下晃. 我通过WindowManager的addVi ...