TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ra G
NA
10.5k
0
Consume Event Generated by VB6 OCX in C#
Jul 8 2009 5:38 PM
Hello ,
Im trying to access a VB6 OCX via C# using late bound. I am able to Invoke the Methods using the Reflection / InvokeMember . However, i do not know how to consume the events generated by the OCX. Im instantiating the OCX using the CreateInstance Method .
Code Snippet..
Type
t =
Type
.GetTypeFromProgID(
"MyOCX"
);
object
test =
Activator
.CreateInstance(t);
t.InvokeMember("LaunchBrowserWindow", System.Reflection.BindingFlags.InvokeMethod, null, test, new object[] { "cnn", "www.cnn.com" });
The above code works fine and it does Launch the Browser. If the user closes the Browser window that just opened , the OCX Triggers a "CloseWindow" event. How can i consume that event ?
Please let me know...
thanx
Reply
Answers (
0
)
Word Automation issue in ASP.Net 2.0 in IIS 6.0 64 bit mode, Windows server 2003
COM Server events usage in .Net Windows Service