Groups | Blog | Home
all groups > vb.net > january 2005 >

vb.net : ActiveX



pmclinn
1/13/2005 8:57:50 PM
Writing an ActiveX Control in VB.NET
http://www.vbdotnetheaven.com/Code/Jun2003/2067.asp
This will give you the basics.
Adrian
1/13/2005 11:00:48 PM
Hi
What would the equivalent to an ActiveX be in VB.Net?

I need an application that will run as a trusted site and be imbedded in a
browser but have access to a locally installed programs Com objects. It also
need to be complied so I can't use VB or JS script.

Also is there an upgrade for code written in VB6 for a an OCX / ActiveX to
what ever has superseded it or is it start again time!

Thanks

Adrian
1/14/2005 11:10:00 AM
Thanks, I will give it a go...

[quoted text, click to view]

Herfried K. Wagner [MVP]
1/14/2005 12:49:43 PM
"Adrian" <Adrian@nospamhotmail.com.uk> schrieb:
[quoted text, click to view]

In General, you cannot create ActiveX *controls* with .NET.

J# Browser Controls provide developers with a way to migrate their existing
Java applet source code to run within the context of the .NET Framework

<URL:http://www.microsoft.com/downloads/details.aspx?FamilyID=325a8f15-fe7b-4087-aa46-6d3e1b6108e0>

MSDN documentation link:

<URL:http://msdn.microsoft.com/library/en-us/dv_vstechart/html/vjtskMigratingJavaAppletsToMicrosoftJBrowserControls.asp>

For .NET 1.0, controls as ActiveX are only supported hosted in MS IE 5+6:

<URL:http://support.microsoft.com/?scid=kb;EN-US;311334>
<URL:http://support.microsoft.com/?scid=kb;EN-US;317346>

Using Windows Forms Controls in Internet Explorer:

<URL:http://msdn.microsoft.com/msdnmag/issues/02/06/rich/rich.asp>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Adrian
1/14/2005 3:10:18 PM
Hi

I can't get the VB.Net example to look like or work the one at
http://www.vbdotnetheaven.com/Code/Jun2003/2067.asp

I cannot get the Inherits System.Windows.Forms.UserControl, AxMycontrol line
to enter with out an error! What have I done wrong?

Thanks (and yes I'm new to .Net!)

Below is what it looks like when I enter the code from the above link!



Namespace ActiveXDotNet

Public Interface AxMyControl

Property UserText() As String

End Interface

End Namespace

Public Class myControl

Inherits System.Windows.Forms.UserControl

Private mStr_UserText As String

Public Property UserText() As String

Get

Return mStr_UserText

End Get

Set(ByVal Value As String)

mStr_UserText = Value

txtUserText.Text = Value

End Set

End Property

End Class


[quoted text, click to view]

Adrian
1/14/2005 4:05:18 PM
OK, it worked without the Inherits System.Windows.Forms.UserControl,AX...
Thanks

[quoted text, click to view]

AddThis Social Bookmark Button