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

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 2984
"Lou" <lo********@comcast.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**************@TK2MSFTNGP03.phx.gbl...
"Lou" <lo********@comcast.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********@comcast.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**************@TK2MSFTNGP02.phx.gbl...
"Lou" <lo********@comcast.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**************@TK2MSFTNGP02.phx.gbl...
"Lou" <lo********@comcast.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******************@newssvr11.news.prodigy.c om...
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**************@TK2MSFTNGP02.phx.gbl...
"Lou" <lo********@comcast.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******************@newssvr11.news.prodigy.c om...
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**************@TK2MSFTNGP02.phx.gbl...
"Lou" <lo********@comcast.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/exposingdotnetcontrols.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
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"...
1
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...
6
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...
4
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...
0
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...
8
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...
0
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...
2
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...
2
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...
3
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...

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.