[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. iOS学习之sqlite的创建数据库,表,插入查看数据

    目录(?)[-] 新建项目sqliteDemo添加使用sqlite的库libsqlite3dylib sqlite 的方法 获取沙盒目录并创建或打开数据库 创建数据表 插入数据 查询数据库并打印数据 ...

  2. 如何解决…has been modified since the precompiled header… was built的问题

    如何解决…has been modified since the precompiled header… was built 的问题 xcode5.1在程序中报错: File '/Applicatio ...

  3. 空间索引网格大小无效的解决方法The spatial index grid size is invalid

    原名引至:http://www.cnblogs.com/linhugh/archive/2012/07/24/2606439.html   之前在做shp数据导入Geodatabase中时,程序运行出 ...

  4. zend studio配置调试(Xdebug方式)

    1.下载xdebug http://xdebug.org/download.php 我下的是PHP 5.4 VC9 (32 bit) [当前系统php是php5.4.14(win32)版本] 2.配置 ...

  5. 解决kylin build cube第一步报错:java.lang.NullPointerException

    报错栈: -- ::, ERROR [pool--thread-] threadpool.DefaultScheduler: : ExecuteException job:933bc47a-302c- ...

  6. OpenShift 如何获取bearer Token以便进行各种API调用

    Openshift 需要通过bearer token的方式和API进行调用,比如基于Postman就可以了解到,输入bearer token后 1.如何获取Bearer Token 但Bearer T ...

  7. eclipse启动tomcat, http://localhost:8080无法访问的解决方案

    问题:: tomcat在eclipse里面能正常启动,但在浏览器中访问http://localhost:8080/不能访问tomcat管理页面,且报404错误.同时其他项目页面也不能访问.访问的时候出 ...

  8. Android -- Service的开启关闭与生命周期

    Service是Android 系统中的四大组件之一,是在一段不定的时间运行在后台,不和用户交互应用组件. service可以在很多场合的应用中使用,比如播放多媒体的时候用户启动了其他Activity ...

  9. 理解GC

    首先看日志内容:  [Full GC 23.32: [ParNew: 2356K->2310K(3251K), 0.000288sec] [Full GC 是名称. [ParNew:是表示收集器 ...

  10. eclipse因为js validator无法通过导致build workspace失败

    eclipse编译工程时时会validator js的errors和warnings,对于一些小型的项目,这当然没任何问题. 但是对于那些拥有大量js文件的web工程,js warnings通常会达到 ...