【发布时间】:2014-02-25 05:25:33
【问题描述】:
我有一个新问题。我刚刚学会了如何在 Visual Basic 12 中创建和导入 DLL。我已经用它走了很远。但我的问题是,我不知道如何调用属于另一个项目的对象。
我的意思是:
我有 2 个项目。一种是调用 DLL 的 EXE。另一个显然是DLL本身。
这是 DLL:
Public Class sys_auth
Private cs As String
Private pw As String
Public Function auth()
cs = TextBoxFromOtherProject.Text [HOW DO I DO THIS?!]
pw = AnotherTextBoxFromOtherProject.Text [HOW DO I DO THIS?!]
Select Case cs
Case "MehName"
If pw = "MehPassword" Then
MsgBox("Authentication successful!", MsgBoxStyle.Information, "Success")
Return True
Else
Return False
End If
Case "YoName"
If pw = "YoPassword" Then
MsgBox("Authentication successful!", MsgBoxStyle.Information, "Success")
Return True
Else
Return False
End If
Case Else
Return False
End Select
End Function
End Class
我怎么称呼它?
【问题讨论】: