473,548 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

User Control

Lou
How do I create a User Control or .dll in VB .Net to be used in VB6?

-Lou
Jun 21 '06 #1
8 3013
"Lou" <lo********@com cast.net> schrieb:
How do I create a User Control or .dll in VB .Net to be used in VB6?

For code-only DLLs, check "Register for COM interop" in the project
properties and reference the generated TLB file from within the VB6 project.
..NET user controls cannot be used on VB6 forms.

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

Jun 21 '06 #2
Lou
Its a user control that I want the form to show up in VB6
I did check the "Register for COM interop" box and that was very helpfull
but I don't get the form to show up in VB6

VB6 code
Dim x As New UserControl1
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:OQ******** ******@TK2MSFTN GP03.phx.gbl...
"Lou" <lo********@com cast.net> schrieb:
How do I create a User Control or .dll in VB .Net to be used in VB6?

For code-only DLLs, check "Register for COM interop" in the project
properties and reference the generated TLB file from within the VB6
project. .NET user controls cannot be used on VB6 forms.

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

Jun 21 '06 #3
"Lou" <lo********@com cast.net> schrieb:
Its a user control that I want the form to show up in VB6
I did check the "Register for COM interop" box and that was very helpfull
but I don't get the form to show up in VB6

VB6 code
Dim x As New UserControl1


As I already said, this 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 #4
Lou
Sorry about that, I didn't put 2 and 2 together on that.

Hers my situation...
We have an application written in C++(I was using vb6 as a test, still the
best test language in the Universe)
that allows for users to create plugins. The plug-in architect has both code
only and UI interfaces. Both are
needed to create a sucessfull plugin. This is done in VB6 by creating a user
control. The ctl is used to interface with the plug-in UI and then
in VB6 another class is added which communicates to the Plug-in code only
interface. The 2 work in concert. Works beautifully
How can I do this with .Net?

Is this at all possible. We have many useres world wide who would like to
create plug-in's using .Net.
Can something be done on the C++ app to handles this?

Thanks for your help and expertise.

-Lou
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:OW******** ******@TK2MSFTN GP02.phx.gbl...
"Lou" <lo********@com cast.net> schrieb:
Its a user control that I want the form to show up in VB6
I did check the "Register for COM interop" box and that was very helpfull
but I don't get the form to show up in VB6

VB6 code
Dim x As New UserControl1


As I already said, this 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 #5
Lou wrote:
Sorry about that, I didn't put 2 and 2 together on that.

Hers my situation...
We have an application written in C++(I was using vb6 as a test, still the
best test language in the Universe)
that allows for users to create plugins. The plug-in architect has both code
only and UI interfaces. Both are
needed to create a sucessfull plugin. This is done in VB6 by creating a user
control. The ctl is used to interface with the plug-in UI and then
in VB6 another class is added which communicates to the Plug-in code only
interface. The 2 work in concert. Works beautifully
How can I do this with .Net?

Is this at all possible. We have many useres world wide who would like to
create plug-in's using .Net.
Can something be done on the C++ app to handles this?

Thanks for your help and expertise.

-Lou
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:OW******** ******@TK2MSFTN GP02.phx.gbl...
"Lou" <lo********@com cast.net> schrieb:
Its a user control that I want the form to show up in VB6
I did check the "Register for COM interop" box and that was very helpfull
but I don't get the form to show up in VB6

VB6 code
Dim x As New UserControl1

As I already said, this is not supported!

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



I have done stuff like this before. You can only show forms created in
..Net, you cannot place a "user control" on the VB6 application. For
example, we have a scanner interface that we developed in VB.Net and
created a COM interop assembly. In this assembly we have a form that
will popup and the user can select the source, scan an image, save it,
view it, etc. This is all controlled through the assembly. You can then
create methods and properties to communicate the data back to the VB6
application. Just remember, it will show up as a separate form and not
embedded on the VB6 forms.
Jun 21 '06 #6
Lou
Since this is a plug-n it needs to be hosted within the C++ app and cannot
be a seperate or pop up form.
it needs to live in a special place in the C++ app.

"CodeMonkey " <sp******@suck. com> wrote in message
news:sG******** **********@news svr11.news.prod igy.com...
Lou wrote:
Sorry about that, I didn't put 2 and 2 together on that.

Hers my situation...
We have an application written in C++(I was using vb6 as a test, still
the best test language in the Universe)
that allows for users to create plugins. The plug-in architect has both
code only and UI interfaces. Both are
needed to create a sucessfull plugin. This is done in VB6 by creating a
user control. The ctl is used to interface with the plug-in UI and then
in VB6 another class is added which communicates to the Plug-in code only
interface. The 2 work in concert. Works beautifully
How can I do this with .Net?

Is this at all possible. We have many useres world wide who would like to
create plug-in's using .Net.
Can something be done on the C++ app to handles this?

Thanks for your help and expertise.

-Lou
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:OW******** ******@TK2MSFTN GP02.phx.gbl...
"Lou" <lo********@com cast.net> schrieb:
Its a user control that I want the form to show up in VB6
I did check the "Register for COM interop" box and that was very
helpfull but I don't get the form to show up in VB6

VB6 code
Dim x As New UserControl1
As I already said, this is not supported!

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



I have done stuff like this before. You can only show forms created in
.Net, you cannot place a "user control" on the VB6 application. For
example, we have a scanner interface that we developed in VB.Net and
created a COM interop assembly. In this assembly we have a form that will
popup and the user can select the source, scan an image, save it, view it,
etc. This is all controlled through the assembly. You can then create
methods and properties to communicate the data back to the VB6
application. Just remember, it will show up as a separate form and not
embedded on the VB6 forms.

Jun 21 '06 #7
Lou, if this has to be a .Net UserControl and has to be displayed
embedded on a VB6 form, you cannot do this, no matter how hard you try.
It is just not supported at all. There isn't even a work around. You can
call code from a COM aware .Net assembly, but you cannot host .Net
UserControls on the VB6 forms. If you absolutely have to do this, then
convert your VB6 app to .Net.

Lou wrote:
Since this is a plug-n it needs to be hosted within the C++ app and cannot
be a seperate or pop up form.
it needs to live in a special place in the C++ app.

"CodeMonkey " <sp******@suck. com> wrote in message
news:sG******** **********@news svr11.news.prod igy.com...
Lou wrote:
Sorry about that, I didn't put 2 and 2 together on that.

Hers my situation...
We have an application written in C++(I was using vb6 as a test, still
the best test language in the Universe)
that allows for users to create plugins. The plug-in architect has both
code only and UI interfaces. Both are
needed to create a sucessfull plugin. This is done in VB6 by creating a
user control. The ctl is used to interface with the plug-in UI and then
in VB6 another class is added which communicates to the Plug-in code only
interface. The 2 work in concert. Works beautifully
How can I do this with .Net?

Is this at all possible. We have many useres world wide who would like to
create plug-in's using .Net.
Can something be done on the C++ app to handles this?

Thanks for your help and expertise.

-Lou
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:OW******** ******@TK2MSFTN GP02.phx.gbl...
"Lou" <lo********@com cast.net> schrieb:
> Its a user control that I want the form to show up in VB6
> I did check the "Register for COM interop" box and that was very
> helpfull but I don't get the form to show up in VB6
>
> VB6 code
> Dim x As New UserControl1
As I already said, this is not supported!

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

I have done stuff like this before. You can only show forms created in
.Net, you cannot place a "user control" on the VB6 application. For
example, we have a scanner interface that we developed in VB.Net and
created a COM interop assembly. In this assembly we have a form that will
popup and the user can select the source, scan an image, save it, view it,
etc. This is all controlled through the assembly. You can then create
methods and properties to communicate the data back to the VB6
application. Just remember, it will show up as a separate form and not
embedded on the VB6 forms.


Jun 21 '06 #8
"CodeMonkey " <sp******@suck. com> schrieb:
Lou, if this has to be a .Net UserControl and has to be displayed embedded
on a VB6 form, you cannot do this, no matter how hard you try. It is just
not supported at all. There isn't even a work around.


There are workarounds available
(<URL:http://www.codeproject .com/cs/miscctrl/exposingdotnetc ontrols.asp>)
but this doesn't make it a supported scenario.

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

Jun 21 '06 #9

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

Similar topics

6
11271
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header" Src="WebControls/Header.ascx" %> The web user control contains the following server controls
1
7549
by: Shourie | last post by:
I've noticed that none of the child controls events are firing for the first time from the dynamic user control. Here is the event cycle. 1) MainPage_load 2) User control1_Load user clicks a dropdown in UC1 _________________________ 1) MainPage_Load 2) User Control_1 Load
6
3357
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all the usual stuff of recreating the usercontrol in the Page Init event. The 'failure' sequence is as follows: - select web form button to display...
4
2499
by: louise raisbeck | last post by:
Resending this as own topic as didnt get answer from original. Would be grateful for a response from anyone that knows. Thanks. Hi there, I found your post really helpful..but i wondered if, once I have exposed a public property containing the value of a textbox in a user control..how do I grab this from the calling page? I cant think of the...
0
3922
by: tony | last post by:
Hello! This is a rather long mail but it's a very interesting one. I hope you read it. I have tried several times to get an answer to this mail but I have not get any answer saying something like this is a bug or that .NET doesn't support what I trying to do. I hope that one that is is microsoft certified read this because this must be a...
8
3010
by: fernandezr | last post by:
I would like to use a user control as a template inside a repeater. Some of the fields in the control should be hidden depending on whether or not there is data. I'm still a ASP .Net newbie so the way I'm going about doing this might be a little off. I'd appreciate some help. Below is the code I have thus far but I'm not sure how to...
0
3403
by: davidr | last post by:
Hi, I have a panel that I load user Control in no problem. The problem arrises when I do a post back on one of these user controls. I have button it does a click event. In this click event I will do some database updates, then I will use reflection to call a method in the parent (this.page) to load the new user control. Its at this...
2
4805
by: rn5a | last post by:
Assume that a user control (MyUC.ascx) encapsulates 2 TextBoxes with the IDs 'txt1' & 'txt2' respectively. To use this user control in an ASPX page, the following Register directive will be required: <%@ Register TagPrefix="UC" TagName="MyUserCtrl" Src="MyUC.ascx" %> Assuming that the ASPX page doesn't use a code-behind, I can access the...
2
15050
by: ChrisCicc | last post by:
Hi All, I got a real doozy here. I have read hundreds upon hundreds of forum posts and found numerous others who have replicated this problem, but have yet to find a solution. Through testing I have been able to find the cause of the problem, and will describe it here first textually and then through a code example. The purpose of what I am...
3
1916
by: Fred Chateau | last post by:
I am trying to access a user control class, for a user control that is loaded dynamically, from the containing page. I have been able to access Web controls in the user control, but so far I have been unable to expose the user control class itself. I'm guessing that I need to set up an interface, but I am not sure how to accomplish this. ...
0
7512
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...
1
7466
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6036
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...
1
5362
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...
0
5082
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...
0
3495
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...
1
1926
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
1
1051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
751
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...

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.