473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

C# form as owner to VB6 form

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
Aug 31 '06 #1
0 992

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Andy Hutchings | last post by:
Hi everybody - hope you can help out here. I have a form in a database, which is a columnar form from one of the tables in the db - there is a sub-form to the form which is a datasheet view of...
3
by: CAD Fiend | last post by:
Hello, Well, after an initial review of my database by my client, they have completely changed their minds about how they want their form. As a result, I'm having to re-think the whole process....
1
by: CAD Fiend | last post by:
Hello, I am making a form that will contain address fields for a land owner, but sometimes the land owner does not live on the same property they own (for instance, they may be renting it out to...
6
by: Chris Thunell | last post by:
I have a form with information on it, when a button is clicked, another form is opened with the following code: Dim myForm As New ReqVendorSelect myForm.Visible = True Once i'm done...
13
by: M O J O | last post by:
Hi, I need to create a popup form what will not steal focus. I've searched the net and I managed to put some code together. Below is the result of my code, but I have a single question .......
2
by: Bruce D | last post by:
I have a form that opens up with my application. It acts as the main menu. Let's just say it looks like this: Public Class frmStartup ' some other settings Public UserID As Integer = 0 ' a...
4
by: trialproduct2004 | last post by:
Hi all I am new to vb.net application. I am using showdialog property of form to display form. First time it is working properly. But next time it is giving me error that ' object reference not...
3
by: Don | last post by:
If you have a form that calls another form via the following code: Dim myForm as Form2 myForm = New Form2 myForm.Owner = Me MyForm.ShowDialog and you minimize the second form, the first form...
6
by: ahmad.humyn | last post by:
I want to call a hidden form. My code goes something like in which the main calls form1. form1 has a button which creates & calls form2 and hides itself. Now I have a button in form2 which if...
4
by: Gari | last post by:
Dear All, I’ve been using this forum since three weeks now and I always had the answer to my questions. So this encourages me to use it again but I hope I am not annoying anybody. I am trying...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.