1

I want to use such a CreateInstance-Function as the following one for GeckoFx in VB.NET.

Xpcom.CreateInstance<nsILoginManager>("@mozilla.org/login-manager;1");

The code above works fine for C-Sharp but not for VB.NET, what should I use instead?

If I try Xpcom.CreateInstance(nsILoginManager)("@mozilla.org/login-manager;1") I get an Error for as the following one :

"This [nsILoginManager] is a type and cannot be used as Expression"

What else should I write/use?

The reason why I try this is to activate the historisation for fields in the webbrowser-component.

4

1 回答 1

1

VB.NET 使用of关键字来指定类型。

尝试这个:

Xpcom.CreateInstance(Of nsILoginManager)("@mozilla.org/login-manager;1")
于 2013-08-06T13:58:04.973 回答