日期:2014-05-18 浏览次数:20947 次
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace WindowsApplication4
{
public partial class Form1 : Form
{
[DllImport("user32.dll", EntryPoint = "ShowCursor", CharSet = CharSet.Auto)]
public static extern int ShowCursor(int bShow);
.............
------解决方案--------------------
请给你的vs装一个pinvoke.net插件,常用c#版的api调用申明都在上面
如果不想装插件,请直接去www.pinvoke.net官方站搜索api申明
------解决方案--------------------
要使用API的话
1:引入命名空间using System.Runtime.InteropServices
2:[DllImport(非托管DLL)]
3:private static extern 返回类型 方法名(参数列表)