473,794 Members | 2,765 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 MyVFPdotNETwrap per
{
private dotNET.Form1 f = null;

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

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

......
}
}

And I use it in VFP like this...
dotNetFormWrapp er = createobject("d otNET.MyVFPdotN ETwrapper)
dotNetFormWrapp er.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 2116
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********@yah oo.com> wrote in message
news:uo******** ******@TK2MSFTN GP15.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 MyVFPdotNETwrap per
{
private dotNET.Form1 f = null;

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

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

......
}
}

And I use it in VFP like this...
dotNetFormWrapp er = createobject("d otNET.MyVFPdotN ETwrapper)
dotNetFormWrapp er.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.c om> wrote
in message news:O%******** *******@TK2MSFT NGP14.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********@yah oo.com> wrote in message
news:uo******** ******@TK2MSFTN GP15.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 MyVFPdotNETwrap per
{
private dotNET.Form1 f = null;

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

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

......
}
}

And I use it in VFP like this...
dotNetFormWrapp er = createobject("d otNET.MyVFPdotN ETwrapper)
dotNetFormWrapp er.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
3402
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
2889
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 Regards Krishna
1
2475
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 Win2k Server - Forms Authentication is setup with a timeout value of 45 minutes in web.config - Session timeout is set to 45 minutes in web.config
3
1702
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 calling the same method same way except for creating object instead directly calling the method? i get this when trying to do that:- ************************************************** Response is not available in this context. Description: An...
6
1250
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 pages? 1) Session? 2) explicitly when redirecting to the next page put the variables after the "?" of the url? 3) Any other easier and more obvious way?
1
1619
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 seeing the other site, I see the SoapException... <?xml version="1.0" encoding="utf-8" ?> - <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"...
4
5645
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 SSL no forms auth. One of the subfolders in the public area is the root of a "protected" area; SSL is required from this subfolder on forward and a web.config in the subfolder specifies forms authentication. From the public area, I provide a...
2
1196
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 formatting and JavaScript issues that require each and every form element's ID to remain unchanged. Unfortunately, whenever
8
2154
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 file using examples on MSDN. I have created a FormsAuthenticationTicket and cookie and added the cookie to the response and then set the SetAuthCookie etc. When I go to the redirected page, I am not sure how to read the cookie value so I know who...
10
1431
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 password every time the user changes a page. This, though, seems like a a lot of overhead in having to make a db call every time a page is changed. I also thought about setting a timer for ten minutes, and on firing of that timer unset a session...
0
9671
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9518
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9035
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6777
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4112
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2919
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.