PC Review


Reply
 
 
Patriot
Guest
Posts: n/a
 
      7th May 2010
Sorry for the cross-post as my post in dotnet.framework and Interop
have no takers.

Could anyone help me how to create a COM ActiveX which after this
object is loaded on a browser, other window programs can access its
public methods?

I have created a simple activeX in VB.net with a winform that has 4
textboxes, exposed its method as COM. After the loading this object
on
the browser, I have another window app to call its method:


Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) _
Handles Button1.Click

Dim xControl As Object

xControl =
Microsoft.VisualBasic.CreateObject("ActiveXDotNetVB.MyControl")
xControl.SetMailForm("myem...@comp.com", "hisem...@domain.com",
"Test Me...", "Blah is testing...")

End Sub


What it is supposed to do is to populate the 4 text boxes on the
browser. Though I got no exception from the codes above, but nothing
is populated the 4 text boxes on the browser. It seems that the
xControl is a separate entity and knows nothing about the activeX
loaded on the browser. How can I make this works?

Thanks


------------
Here is my class:


Public Interface AxMyControl
Sub SetMailForm(ByVal EmailAddress As String, _
ByVal Recipient As String, _
ByVal Subject As String, _
ByVal Body As String)
End Interface


Public Class MyControl
Implements AxMyControl

Public Sub SetMailForm(ByVal EmailAddress As String, _
ByVal Recipient As String, _
ByVal Subject As String, _
ByVal Body As String) Implements
AxMyControl.SetMailForm

txtSender.Text = EmailAddress
txtTo.Text = Recipient
txtSubject.Text = Subject
txtBody.Text = Body

End Sub
End Class


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create an ActiveX in C# using other ActiveX created in VC++ =?Utf-8?B?TW9uaWth?= Microsoft Dot NET Framework 0 13th Jul 2007 06:54 AM
publish activeX combobox and other activeX control =?Utf-8?B?aXJlbmUgYw==?= Microsoft Excel Programming 0 19th Mar 2007 07:19 AM
activex settings prohibit running ActiveX controls Bob Hartung Windows XP Help 3 21st Jul 2005 05:49 AM
Q for Steve Lebans: RTF editing: To ActiveX or not to ActiveX? =?Utf-8?B?QnJhaW5sb3JkIE1lc29tb3JwaA==?= Microsoft Access Form Coding 1 19th Apr 2004 09:38 PM
activex in activex event handling S.Kartikeyan Microsoft C# .NET 2 26th Dec 2003 05:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:18 PM.