473,395 Members | 1,535 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,395 software developers and data experts.

Calling a .net form from vb6

We are gradually converting a huge vb6 app to .net. How can I call a .net
winform from a button on a vb6 form?
Nov 20 '05 #1
3 1557
Hi William,

You cannot mix a vb6 application with a vb.net application.

The only thing that is partialy equal in those are the functions in the
visualbasic namespace, the operators and also partialy the style of coding
inside a function or a sub. The rest is complete new.

While vb6 uses intermidiate code with a runtimer, is vbNet using
intermidiate code processed by the framework.

I have very few vb6 expirience however I assume you can start an application
from VB6 however that is in my opinion more an VB6 classic question.

For that are the newsgroups.

microsoft.public.vb *

Cor
Nov 20 '05 #2
* "Cor Ligthert" <no**********@planet.nl> scripsit:
You cannot mix a vb6 application with a vb.net application.


That's true, but you can write a .NET component and register it for COM
interop and then use this DLL in your VB6 project. Nevertheless, I
would not use .NET GUIs in VB6.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3
Public Class Organize

Dim FrmOrganize1 As FrmOrganize

public sub new
end sub

public sub Show
FrmOrganize1.Show
end sub
end class

I built a dll in .net. I used regasm to register it and it is registered as
Myproject.Organize

In VB6, I add a reference to the .tlb.

I then call

dim frm
set frm = Myproject.Organize
frm.show

I get the error cannot create a file when the file already exists. What am
I doing wrong?

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2g***********@uni-berlin.de...
* "Cor Ligthert" <no**********@planet.nl> scripsit:
You cannot mix a vb6 application with a vb.net application.


That's true, but you can write a .NET component and register it for COM
interop and then use this DLL in your VB6 project. Nevertheless, I
would not use .NET GUIs in VB6.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #4

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

Similar topics

10
by: headware | last post by:
I know that you can call the method of one from from inside another form by doing something like this Forms("MyForm").MyFunction(12, 34) However, you have to know that MyForm has a function...
14
by: ericellsworth | last post by:
Hi, I'm trying to use a class to pass variables back and forth from a form opened in dialog mode. I have created a class which invokes a form in its show method, like so: Public Sub Show() '...
2
by: mark | last post by:
I am developing an application in .Net C# that needs to restore a number of tool windows to some previous location and size. The problem I have is that when I create the form and set the Location...
2
by: Renzo | last post by:
hi ! i've recently begun developing in c# and i'd like to know what's the best way of calling a form from an already instanced form ? I have done a "Login" form which I run in the Main() using...
6
by: Amjad | last post by:
Hi, I want to make a project that calls and executes a function (VB code) made in a seperate file in the Application Folder. I know I can create the function in my project and call it internally,...
0
by: teddysnips | last post by:
I have Search form that allows users to retrieve records into a DataGrid. There are two search criteria - a Month and a Year, which are selected from drop-down lists. There is a server-side...
3
by: Opa | last post by:
Hi , I have a form with javasript which launches a popup via the showModalDialog() method. I get the dialog to open, now I am trying to first get a reference to the calling form from the popup...
7
by: Lee Crabtree | last post by:
I remember when I was first getting into .NET Forms programming that there was a rather emphatic rule about not constructing a form before calling Application.Run with it. So this: ...
1
by: SAL | last post by:
Hello, I'm developing this remoting app (.net 2.0) and I need to bring the server app's form to the front often. Since you can not do cross-thread communication on a form or control without using...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
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,...
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
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...

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.