[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. Java中文件与字节数组转换

    注:来源于JavaEye 文件转化为字节数组: http://www.javaeye.com/topic/304980 /** * 文件转化为字节数组 * * @param file * @retur ...

  2. Switch debouncer uses only one gate

    The circuit in Figure 1 produces a single debounced pulse each time you press S1. Moreover, the circ ...

  3. Ant简单工程的构建

    1.在Ant的官方网站http://ant.apache.org/bindownload.cgi下载Ant最新版本(我下载的是apache-ant-1.8.2-bin.zip),Ant无需安装,直接解 ...

  4. Java并发教程(Oracle官方资料)

    计算机的使用者一直以为他们的计算机可以同时做很多事情.他们认为当其他的应用程序在下载文件,管理打印队列或者缓冲音频的时候他们可以继续在文字处理程序上工作.甚至对于单个应用程序,他们任然期待它能在在同一 ...

  5. boa cgi程序cgi_header: unable to find LFLF

    ftp必须用二进制模式上传才可以 sqlite3 arm-linux-gcc hello.c -o hello.cgi -I /cgi/include -L /cgi/lib -static -lsq ...

  6. 《CUDA并行程序设计:GPU编程指南》

    <CUDA并行程序设计:GPU编程指南> 基本信息 原书名:CUDA Programming:A Developer’s Guide to Parallel Computing with ...

  7. 需要掌握哪些python标准库和三方库?

    讨论参考:https://www.zhihu.com/question/20501628 库太多了,根据需要使用相应领域的三方库:至于对于企业常用的三方库,可以参考热门招聘网站的招聘说明

  8. OpenJudge 8782 乘积最大——S.B.S

    8782:乘积最大 总时间限制: 1000ms 内存限制:  65536kB 描述 今年是国际数学联盟确定的“2000——世界数学年”,又恰逢我国著名数学家华罗庚先生诞辰90周年.在华罗庚先生的家乡江 ...

  9. SASS详解之编译输出的样式

    SASS是一种CSS预处理语言,没有装环境的话是不能被解析的.但是有了koala编译工具之后,解析SASS不需要环境也毫无压力了.SASS的输出格式有四种:嵌套.扩大.紧凑和压缩.下面结合小例子为大家 ...

  10. C# 轻松实现对窗体(Form)换肤[转]

    一直想写一个比较完整的.容易扩展的窗体换肤的方案,由于时间问题,都没去实现这个想法.现在有朋友提出需要,就把以前写的重新拿出来看了一篇,花了些时间,做出了现在的这个换肤的方案.实现的过程中遇到了不少问 ...