调用OCX控件的步骤:1.在系统中注册该ocx控件,命令:regsvr32.exe 控件位置(加 /u 参数是取消注册)2.在.net的工具箱中添加该控件,拖到form中去就可以了. 不用工具箱的话,自己手工添加,需要注意一个问题,就是要用Aximp.exe来包装一下ocx控件的类,然后再程序中引用生成的dll就可以了.aximp [options]{file.dll | file.ocx}The following command generates MediaPlayer.dll and A
在Winform中对数据库进行操作缺乏安全性,因而可以使用Winform调用WebService来实现对数据库的各种操作. 在VS2010中,创建一个Web服务程序,第一:创建一个空的Web应用程序,名字自己起.第二:鼠标右击刚刚创建的工程,选择添加,在弹出的框中选择Web服务,自己起好名字,确定即可,这样就创建好一个Web服务程序了. 经过上上面的步骤,我们就可以添加方法来实现数据库的操作. 代码如下: using System; using System.Collections.Generi
using System; using System.IO; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace BaiDuMap { public partial class Form1 : Form { public Form