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

Using .NET user controls into VB6

Hi

I just developed a small form in C# to use inside of my old VB6
programs.
My first step was to build a new WindowsControlLibrary project and add
the usercontrol to it.
It compiled, a DLL was built, and by setting the "Register for COM
Interop" to TRUE a .tlb file was also built. I added this tlb file as a
reference into VB6.

Now I put a menu item and in the code for the menu item the following:

Dim myControl As MyControl.UserControl1

How do I show the control to the user now? Any ideas? Sorry if this
sounds stupid.

Thanks!

Eduardo

Jun 20 '06 #1
2 1298
<em*******@gmail.com> schrieb:
I just developed a small form in C# to use inside of my old VB6
programs.
My first step was to build a new WindowsControlLibrary project and add
the usercontrol to it.
It compiled, a DLL was built, and by setting the "Register for COM
Interop" to TRUE a .tlb file was also built. I added this tlb file as a
reference into VB6.

Now I put a menu item and in the code for the menu item the following:

Dim myControl As MyControl.UserControl1

How do I show the control to the user now? Any ideas? Sorry if this
sounds stupid.


This scenario is not supported.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Jun 20 '06 #2
How about this:

I write a C# application and call it from VB6 as a normal executable.
There is SOME WAY that I can have access to the controls of the screen,
such as, textbox, combobox, buttons, etc. If not, there is a way to
create a collection of these objects and pass as a parameter to the
program ?

Thanks!

Eduardo

Herfried K. Wagner [MVP] wrote:
<em*******@gmail.com> schrieb:
I just developed a small form in C# to use inside of my old VB6
programs.
My first step was to build a new WindowsControlLibrary project and add
the usercontrol to it.
It compiled, a DLL was built, and by setting the "Register for COM
Interop" to TRUE a .tlb file was also built. I added this tlb file as a
reference into VB6.

Now I put a menu item and in the code for the menu item the following:

Dim myControl As MyControl.UserControl1

How do I show the control to the user now? Any ideas? Sorry if this
sounds stupid.


This scenario is not supported.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


Jun 21 '06 #3

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

Similar topics

19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
11
by: Lloyd Sheen | last post by:
Is there any one who has actually done this. I have now scanned more web articles about this with the realization that not one of them (including MSDN docs) outlines how to do this. This is...
5
by: Marcel Gelijk | last post by:
Hi, I am trying to create a User Control that is located in a seperate class library. The User Control contains a textbox and a button. The page generates an exception when it tries to access...
1
by: john | last post by:
I have two different problems: 1. When the user has clicked on a button that is causing the browser to post back to the server, it could take a little while for the new page to show up. So in...
2
by: Peter Jackson | last post by:
I'm using v2 of the UIP App. Block. I've created all my .aspx pages, all of which contain .ascx user controls. The .ascx user controls provide the standard server controls (i.e., LinkButtons, etc.)...
1
by: Robert Howells | last post by:
Perhaps I'm just too new at this to pull it off, or perhaps it's just bad architecture. I'd appreciate some feedback on the the wisdom (or lack thereof) in attempting the following: I'm not new...
10
by: George G. | last post by:
Hi there, I am busy writing a new asp.net application and I am reusing some of my existing asp functions and methods in a user control. I need access to session, request and response in some of...
2
by: Steve Richter | last post by:
I like the idea of being able to place server controls in an assembly and use them in all of my web applications. On the other hand I like the ease of using an .ascx file when I write user...
1
by: E. Tom Jorgenson | last post by:
I've run into a problem on a couple of projects that I think I've identified - but would like confirmation of what I think is going on. Also interested in any fast solutions to fix the user...
5
by: Dennis Fazekas | last post by:
Greetings, I am creating a web form which will all the user to add an unlimited number of email addresses. Basically I have 3 buttons, "Add Another Email", "-" to remove, and a "Save" button....
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.