473,406 Members | 2,745 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,406 software developers and data experts.

MDI Forms... Some unusual request...

Hi

Could I somehow make an MDI Child form in .NET but to have it displayed as
child in another application. I'll try to elaborate. I have application in
Visual FoxPro. In C# I made a little class and use it over COM Interop in
VFP.

Here is the example in C#.....

using System;
using System.Windows.Form;

namespace dotNET
{
public class MyVFPdotNETwrapper
{
private dotNET.Form1 f = null;

public MyVFPdotNETwrapper()
{
this.f = new dotNET.Form1();
}

public void ShowForm()
{
f.Show();
}

......
}
}

And I use it in VFP like this...
dotNetFormWrapper = createobject("dotNET.MyVFPdotNETwrapper)
dotNetFormWrapper.Show()

And it works. Form is displayed, I can use all .NET stuff from VFP, and over
VFP COM I can execute some of my procedures in original VFP application from
..NET. I was wondering can I make that form somehow a child form of my VFP
application. I know it isn't likely it can be done but it would be great.
I'm interested in your ideas and possible solutions (if there is any).

Thx
Nov 16 '05 #1
2 2102
Hi,

What you can probably do is extending the Show method to accept the HWND of
the parent window. Then, when you create a form in your .NET wrapper, use
the passed window handle to make the form being created a child of the VFP
main form.

I'm afraid you'll have to resort to plain WinAPI (namely SetParent) to
establish the parent-child relationship.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"Rutko" <ru********@yahoo.com> wrote in message
news:uo**************@TK2MSFTNGP15.phx.gbl...
Hi

Could I somehow make an MDI Child form in .NET but to have it displayed as
child in another application. I'll try to elaborate. I have application in
Visual FoxPro. In C# I made a little class and use it over COM Interop in
VFP.

Here is the example in C#.....

using System;
using System.Windows.Form;

namespace dotNET
{
public class MyVFPdotNETwrapper
{
private dotNET.Form1 f = null;

public MyVFPdotNETwrapper()
{
this.f = new dotNET.Form1();
}

public void ShowForm()
{
f.Show();
}

......
}
}

And I use it in VFP like this...
dotNetFormWrapper = createobject("dotNET.MyVFPdotNETwrapper)
dotNetFormWrapper.Show()

And it works. Form is displayed, I can use all .NET stuff from VFP, and
over VFP COM I can execute some of my procedures in original VFP
application from .NET. I was wondering can I make that form somehow a
child form of my VFP application. I know it isn't likely it can be done
but it would be great. I'm interested in your ideas and possible solutions
(if there is any).

Thx


Nov 16 '05 #2
It works perfectly. Thx.

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:O%***************@TK2MSFTNGP14.phx.gbl...
Hi,

What you can probably do is extending the Show method to accept the HWND
of the parent window. Then, when you create a form in your .NET wrapper,
use the passed window handle to make the form being created a child of the
VFP main form.

I'm afraid you'll have to resort to plain WinAPI (namely SetParent) to
establish the parent-child relationship.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"Rutko" <ru********@yahoo.com> wrote in message
news:uo**************@TK2MSFTNGP15.phx.gbl...
Hi

Could I somehow make an MDI Child form in .NET but to have it displayed
as child in another application. I'll try to elaborate. I have
application in Visual FoxPro. In C# I made a little class and use it over
COM Interop in VFP.

Here is the example in C#.....

using System;
using System.Windows.Form;

namespace dotNET
{
public class MyVFPdotNETwrapper
{
private dotNET.Form1 f = null;

public MyVFPdotNETwrapper()
{
this.f = new dotNET.Form1();
}

public void ShowForm()
{
f.Show();
}

......
}
}

And I use it in VFP like this...
dotNetFormWrapper = createobject("dotNET.MyVFPdotNETwrapper)
dotNetFormWrapper.Show()

And it works. Form is displayed, I can use all .NET stuff from VFP, and
over VFP COM I can execute some of my procedures in original VFP
application from .NET. I was wondering can I make that form somehow a
child form of my VFP application. I know it isn't likely it can be done
but it would be great. I'm interested in your ideas and possible
solutions (if there is any).

Thx

Nov 16 '05 #3

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

Similar topics

10
by: Chris Leffer | last post by:
Hi. If I have two forms in the same asp page: <form name='firstForm' action='myPage.asp'> </form> <form name='secondForm' action='myPage.asp'> </form>
2
by: KK | last post by:
Hi All I need to create a windows form control(from System.Windows.Forms.dll assembly) dynamically using Activator.How do I achieve this?Sample code is much more helpful. Thanks in advance ...
1
by: Scott | last post by:
Hi, We're having an issue with Forms Authentication cookies being treated as expired / invalid, and being deleted. This is causing our intranet users a great deal of pain - Running IIS 5.0 on...
3
by: Farooq Khan | last post by:
why does Response.Write in a method of code-beind class when called from inpage code (i.e in <%---%>), after creating object of that class, fails when called while it works perfectly ok while...
6
by: Girish | last post by:
so asp.net does not allow you to change the action of a form to another page other than itself (if your using form runat=server). This is by design. So what is the best way to pass values between...
1
by: Marty McDonald | last post by:
I have a web page. It uses web service (on localhost) to get data. I'm able to get to my web service properly, data is returned. Then, via JavaScript, I HTTP post to another site. Instead of...
4
by: 23s | last post by:
I had this problem in the past, after a server reformat it went away, and now after another server reformat it's back again - no clue what's doing it. Here's the flow: Website root is public, no...
2
by: Neo Geshel | last post by:
Greetings! I have a rather unusual request about a rather basic need. I need to be able to bind data to a page, but WITHOUT using a Repeater, DataGrid or DataList. Why? Well, I have some...
8
by: =?Utf-8?B?TFc=?= | last post by:
Hello! I am just learning about forms authentication so please excuse this basic question. I am using .NET 1.1 and C#. I have created my web.config file and my login.aspx and the associated cs...
10
by: sheldonlg | last post by:
I got an unusual request. One customer wants a password/access made available to a user that is valid for only, say, ten minutes. I know that I can enforce this by having a revalidation of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.