Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 28th, 2009, 04:00 AM
Registered User
 
Join Date: Jul 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default return type as Form

hi all.
first of all, i want to precede the fact that i'm not a vb developer. It just for specific need.

I have a legacy application written in vb6 and i want to load its various forms from .Net application.

Sounds simple... but the thing is, that i need, from some reasons to hold the reference to the opened form...

I tried to export a function inside the vb main class which its return type is Form.
It appears it's not working... I had a compile error... talking about private and public issues. If i realized well, the Form object in vb is Private and the main class cannot reached to it. Therefore the Form type is not available.


my question is: how can i get reference to the vb6's form from .net which later i would be able to release its memory from .Net?
 
Old August 9th, 2009, 02:25 AM
Authorized User
 
Join Date: Mar 2009
Posts: 49
Thanks: 0
Thanked 8 Times in 8 Posts
Default

If this were the other way around I would suggest that you use FindWindow, EnumChildWindows, and SendMessage to "scrape" the information you want from the other program, but since this is .NET question I would suggest you ask this question in one of the many .NET forums.



Good Luck





Similar Threads
Thread Thread Starter Forum Replies Last Post
Change return type of Click Event prasanna.nadgir C# 11 August 9th, 2007 11:11 PM
Generic return type mega C# 4 November 30th, 2006 11:00 AM
Generic return type mega C# 2005 1 November 30th, 2006 07:27 AM
How to Handle VARIANT return type ronaldo07 Visual C++ 0 June 15th, 2006 04:41 PM
return type? Sibananda Tripathy J2EE 1 January 3rd, 2005 04:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.