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); .............此例为调用ShowCursor
1:引入命名空间using System.Runtime.InteropServices
2:[DllImport(非托管DLL)]
3:private static extern 返回类型 方法名(参数列表)
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);
.............此例为调用ShowCursor
1:引入命名空间using System.Runtime.InteropServices
2:[DllImport(非托管DLL)]
3:private static extern 返回类型 方法名(参数列表)