PC Review


Reply
Thread Tools Rate Thread

C# form as owner to VB6 form

 
 
Kimmo Laine
Guest
Posts: n/a
 
      31st Aug 2006
Hi!

I have old VB6 COM-component (inprocess server) which will display some info
in a VB form:

// In C#
MyVBServer theServer = new MyVBServer();
theServer.ShowInfo();

When I call the ShowInfo-method, i get the following error: "Non-modal forms
cannot be displayed in this host application from an ActiveX DLL, ActiveX
Control, or Property Page." Now, this server, MyVBServer, has property
called OwnerForm, which is used as a owner to form (VB) which is displayed.
This propertys type is (VB) Object.

My question: is there a way to do something like this in my C# (.NET 2.0)
form:

// In C#
MyVBServer theServer = new MyVBServer();
theServer.OwnerForm = this;
theServer.ShowInfo();

The VB6 code is a legacy code, which i canīt touch/rewrite.



Thx!

Kimmo Laine


 
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
Re: How to minimize form owner when a form is minimized? =?Utf-8?B?VG9ueSBN?= Microsoft VB .NET 0 7th Sep 2005 01:23 AM
Form.ShowInTaskBar and Form.Owner used together causes Owner form to go to the back. petert@ticketek.com.au Microsoft Dot NET Framework Forms 0 13th Apr 2004 01:16 AM
Position owned form relative to owner form on screen Dean Slindee Microsoft VB .NET 2 5th Feb 2004 09:08 AM
Using the shortcut keys of an Owner form from within the owned form Ioannis Demetriades Microsoft VB .NET 0 17th Dec 2003 07:41 AM
drawing focus rectengle for owner drawn window form(like real one player form o) hassan azizi Microsoft Dot NET Framework Forms 1 4th Aug 2003 10:20 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:37 AM.