我的UserControl源代码如下:
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
using System.Runtime.InteropServices;
[DllImport("Sa7134Capture.dll", EntryPoint="VCAGetDevNum", CharSet=CharSet.Ansi, CallingConvention=CallingConvention.Winapi)]
public static extern long VCAGetDevNum();
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(16, 24);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(80, 23);
this.button1.TabIndex = 0;
long devNum = UserControl1.VCAGetDevNum();
//bool ret = UserControl1.VCAInitSdk((int)this.Handle, true, false);