码迷,mamicode.com
首页 >  
搜索关键字:dllimport    ( 445个结果
c# api GetSystemMetrics
[DllImport("user32")]public static extern int GetSystemMetrics(int nIndex);nIndex值:SM_CXSCREEN = 0 '屏幕宽度SM_CYSCREEN = 1 '屏幕高度SM_CXVSCROLL = 2 '垂直滚动条的宽...
分类:Windows程序   时间:2015-05-11 14:30:49    阅读次数:197
C# 发送WM_COPYDATA消息--网络COPY供个人参考
C# 发送WM_COPYDATA消息using System.Runtime.InteropServices; [DllImport("User32.dll", EntryPoint = "FindWindow")] private static extern IntPtr FindWindow(....
分类:Windows程序   时间:2015-05-10 00:58:40    阅读次数:379
百度在线桌面壁纸(开源)
介绍:本程序主要根据百度个性首页换肤功能的数据演变而来实现一个在线切换壁纸的功能。效果图:主要用到的API1 [DllImport("user32.dll", EntryPoint = "SystemParametersInfo")]2 public static e...
分类:其他好文   时间:2015-05-05 16:25:45    阅读次数:95
dll动态链接库使用
C#调用dll,复制dll到exe同目录下,通过DllImport引入dll到程序中,具体操作:1)引用命名空间:usingSystem.Runtime.InteropServices;2)在C#语言源程序中声明外部方法:[DllImport("dll名称+后缀")]//如:[DllImport("user32.dll")]staticexternintMessageBoxA(inthWnd,stringm..
分类:其他好文   时间:2015-04-28 00:10:42    阅读次数:183
设置ie cookie 转
C# 设置IE Cookie 从而实现自动打开需要登录的页面,比如点击QQ面板上的qq空间,他就直接进入你的QQ空间,无需再次登录。这个其实是使用的一个api函数就搞定了,但是设置上很有技巧。/// /// 设置cookie /// [DllImport("wininet.dll"...
分类:其他好文   时间:2015-04-26 19:30:40    阅读次数:176
__declspec(dllexport)和__declspec(dllimport)
1、解决的问题: 考虑下面的需求,使用一个方法,一个是提供者,一个是使用者,二者之间的接口是头文件。头文件中声明了方法,在提供者那里方法应该被声明为__declspec(dllexport),在使用者那里,方法应该被声明为__declspec(dllimport)。二者使用同一个头文件,作为接口,....
分类:其他好文   时间:2015-04-25 15:00:16    阅读次数:163
C# winform 窗体从右下角向上弹出窗口效果
/// /// 窗体动画函数 注意:要引用System.Runtime.InteropServices; /// /// 指定产生动画的窗口的句柄 /// 指定动画持续的时间 /// 指定动画类型,可以是一个或多个标志的组合。 /// [DllImport("use...
分类:Windows程序   时间:2015-04-24 18:21:21    阅读次数:183
winform在设置控件enabled=false后,无法更改控件字体颜色的问题
项目界面设计的时候,发现在设置button的enabled=false后,原本设计的字体颜色跟预设的不一样,查了一些资料后,在网上看到这样一段代码: [System.Runtime.InteropServices.DllImport("user32.dll")] publ...
分类:Windows程序   时间:2015-04-22 13:10:16    阅读次数:177
C#读取或设置ScrollLock
C#读取或者设置ScrollLock状态,允许滚动状态读取或者设置usingSystem;usingSystem.Runtime.InteropServices;usingSystem.Windows.Forms;namespaceRobvanderWoude{publicclassScrollLock{[DllImport("user32.dll")]staticexternvoidkeybd_event(bytebVk,bytebScan,uintdwFlags,..
分类:Windows程序   时间:2015-04-18 14:41:39    阅读次数:155
安装字体或直接调用非注册字体 z
1.安装字体//程序直接将字体文件安装的系统中。函数声明:[DllImport("kernel32.dll", SetLastError = true)]static extern int WriteProfileString(string lpszSection, string lpszKeyNa...
分类:其他好文   时间:2015-04-12 16:13:30    阅读次数:101
445条   上一页 1 ... 30 31 32 33 34 ... 45 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!