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

Consuming visual managed controls from unmanaged apps (i.e. VB6)

I have developed a managed (VB.NET) usercontrol and have consumed it in VB6
with limited success. I'm not sure I'm going about it the correct way, so I
wanted to try to get a consensus from others. Basically I created the
usercontrol and exposed it to COM using the standard (I think) methods.
Without boring everyone with a lot of details, what I want to be able to do
is add that component to the toolbox in VB6 and use it on VB6 forms. The
only way I can get it on the form right now is by dynamically adding it at
Form_Load with Me.Controls.Add <prog_id>, <name>. It shows on the form but
the visual behavior of the control is odd (i.e. its border disappears when
the control loses focus, comes back when the control gains focus, focus can
only be regained with a double-click, etc.)

I guess my question is, has anyone done this successfully before. If so can
you point me to any resources to get me there?

Thanks in advance.
Brett
Nov 21 '05 #1
1 1005
"Brett" <do*********************************************** @swbell.net>
schrieb:
I have developed a managed (VB.NET) usercontrol and have consumed it in VB6
with limited success. I'm not sure I'm going about it the correct way, so
I wanted to try to get a consensus from others. Basically I created the
usercontrol and exposed it to COM using the standard (I think) methods.
Without boring everyone with a lot of details, what I want to be able to do
is add that component to the toolbox in VB6 and use it on VB6 forms.


That's not supported. In other words, you cannot use VB6 as
host-environment for .NET Windows Forms controls.

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

Nov 21 '05 #2

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

Similar topics

3
by: New World Order Pigs | last post by:
Sorry if this is the wrong group, but it seems like a good place to start. I have a control, creating a dll written in c#/.net and some unmanaged code in c++ using embedded c++ V3. Yes, it is for...
0
by: Flora Salim | last post by:
1. Does Visual C++.NET (managed environment) has much to offer than Visual C++ 6 (unmanaged) in terms of performance and stability? The thing that bother me is whether .NET takes much more disk...
2
by: Dave | last post by:
Hi, I'm writing a research simulation program and would like to write it in c++. It should be as fast as possible and am not sure if it makes a difference to use managed or unmanaged code. I will...
2
by: asanford | last post by:
We use StackWalk(StackWalk64) from dbghelp.dll to walk our callstacksas needed, using the various Sym* methods (SymGetSymFromAddr, SymGetLineFromAddr) to resolve source file, function name, and...
7
by: Bob Rock | last post by:
Hello, converting from the managed to the unmanaged world (and viceversa strings) and byte arrays is something I do often and I'd like to identify the most correct and efficient way to do it....
3
by: Thorsten | last post by:
HI I'm a C# developer and unfortunately I have to write now some code in managed and unmanaged C++. In this area I'm Newbie and therefore please forgive me if this is a really simple...
12
by: doug | last post by:
I understand the basics of what managed code offers and that you open yourself up to security issues if you allow unmanaged code. We already have a decent amount of VB6 code to include COM DLLs. ...
2
by: interX | last post by:
Hi, I have a little problem with managed/unmanaged in Visual Studio 2005 (Compiler setting /clr). I need to overhand several function pointers from managed to unmanaged. These function pointers...
1
by: Creativ | last post by:
I'm still confused with managed and unmanaged In VS2005, in the same project with /CLR switch on. in managed.h ref class ManagedClass { } in unmanaged.h
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.