API一般用c实现做底层或高效或系统等功能函数库文件DLL,可为各种win的开发语言所调用
VB本身也可以做,一般是做成ocx控件比较方便
比如一个调用第3方DLL的例子:
Private Declare Function icePub_sendMailText Lib "icePubDll.dll" (ByVal strusername As String, ByVal strPassword As String, ByVal strSmtpServer As String, ByVal sendMail As String, ByVal toMailList As String, ByVal strSubject As String, ByVal strText As String) As Integer
a2 = icePub_sendMailText("ahuinuli", "112233", "smtp.tom.com", "ahuinuli@tom.com", "42080286@qq.com", "测试标题test4", "测试文本内容hello4")
'一句声明,一句调用,就能完成发送邮件的功能
api 是系统本来的函数 什么编程软讲都可以使用
vb的函数是只有vb可以用的
作用域就是差不多是
共有声明与私有声明的分别!!!