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

How Can You Create A DLL In VB.NET For VB6?

Is it possible to create a DLL from VB.NET that is referenceable from VB6?
If so, how? I tried creating a Class Library project. It can be referenced
fine from VB.NET, but not from VB6. Thanks.
Nov 21 '05 #1
12 10062
I suggest in future you Google first but however:

http://support.microsoft.com/kb/817248/EN-US/

hth
Richard
Nov 21 '05 #2
On Sun, 8 May 2005 13:05:20 -0700, Phil Galey wrote:
Is it possible to create a DLL from VB.NET that is referenceable from VB6?
If so, how? I tried creating a Class Library project. It can be referenced
fine from VB.NET, but not from VB6. Thanks.


Is it REALLY 5/8/2005 where you live?

Please fix your computer's date and time

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
Nov 21 '05 #3
On Sun, 8 May 2005 13:05:20 -0700, Phil Galey wrote:
Is it possible to create a DLL from VB.NET that is referenceable from VB6?
If so, how? I tried creating a Class Library project. It can be referenced
fine from VB.NET, but not from VB6. Thanks.


Is it REALLY 5/8/2005 where you live?

Please fix your computer's date and time

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
Nov 21 '05 #4
Phil Galey wrote:
Is it possible to create a DLL from VB.NET that is referenceable from VB6?
If so, how? I tried creating a Class Library project. It can be referenced
fine from VB.NET, but not from VB6. Thanks.


Could you please state why you want to "downgrade" from vb.net to vb6? I
find it unlikely to be an efficient use of resources if you run vb.net
assemblies inside VB6.

Michel van den Berg
Nov 21 '05 #5
LBS
This is actually an excelent question
Imagine that you have 2 app : 1 in VB6 and 1 in Vb.net.
You write a dll in dot net that takes care of process, but now you are
required to implement the same functionality in the vb6 app. Why would you
write it twice ?
I do not have the answer to the question, but I will be watching that post.

"Michel van den Berg" <mv*@promontis.nl> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Phil Galey wrote:
Is it possible to create a DLL from VB.NET that is referenceable from
VB6?
If so, how? I tried creating a Class Library project. It can be
referenced
fine from VB.NET, but not from VB6. Thanks.


Could you please state why you want to "downgrade" from vb.net to vb6? I
find it unlikely to be an efficient use of resources if you run vb.net
assemblies inside VB6.

Michel van den Berg

Nov 21 '05 #6
sbs
Yes you can write com compatible DLL withj dot net (dll class, check the
com interop compatibel check mark in the project properties). These are
then usable from vb6 transparently.

As usual the managed-unmanaged border crossing fee is huge :p

LBS wrote:
This is actually an excelent question
Imagine that you have 2 app : 1 in VB6 and 1 in Vb.net.
You write a dll in dot net that takes care of process, but now you are
required to implement the same functionality in the vb6 app. Why would you
write it twice ?
I do not have the answer to the question, but I will be watching that post.

"Michel van den Berg" <mv*@promontis.nl> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Phil Galey wrote:
Is it possible to create a DLL from VB.NET that is referenceable from
VB6?
If so, how? I tried creating a Class Library project. It can be
referenced
fine from VB.NET, but not from VB6. Thanks.


Could you please state why you want to "downgrade" from vb.net to vb6? I
find it unlikely to be an efficient use of resources if you run vb.net
assemblies inside VB6.

Michel van den Berg


Nov 21 '05 #7
Yes, the fee is indeed huge: I recommend crossing it only if you have
to. And as said earlier: you could make it com compatible, but please
keep in mind that not all functionality works 100% transparently: for
example, the vb6 designer will not react the same if you use such DLL in
design time.

sbs wrote:
Yes you can write com compatible DLL withj dot net (dll class, check the
com interop compatibel check mark in the project properties). These are
then usable from vb6 transparently.

As usual the managed-unmanaged border crossing fee is huge :p

LBS wrote:
This is actually an excelent question
Imagine that you have 2 app : 1 in VB6 and 1 in Vb.net.
You write a dll in dot net that takes care of process, but now you are
required to implement the same functionality in the vb6 app. Why would
you write it twice ?
I do not have the answer to the question, but I will be watching that
post.

"Michel van den Berg" <mv*@promontis.nl> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Phil Galey wrote:

Is it possible to create a DLL from VB.NET that is referenceable
from VB6?
If so, how? I tried creating a Class Library project. It can be
referenced
fine from VB.NET, but not from VB6. Thanks.

Could you please state why you want to "downgrade" from vb.net to
vb6? I find it unlikely to be an efficient use of resources if you
run vb.net assemblies inside VB6.

Michel van den Berg


Nov 21 '05 #8
I am new commer in VB.NET.
How I will add a new record in a access table through ADD NEW() or other code in
VB.NET (through data entry FORM)?
will you please help for that code, urgently ?
thanking you.

Posted via DevelopmentNow Groups
www.developmentnow.com/g
www.developmentnow.com
Nov 21 '05 #9
BKumar,

There are thousands of methods in VBNet for that. Therefore your question is
to open.

To see something about dataaccess you can have a look at this page, however
it gives only some samples because every problem can have its own solution.

http://samples.gotdotnet.com/quickstart/

Cor
Nov 21 '05 #10
"B.Kumar" <bi************@yahoo.com> schrieb:
I am new commer in VB.NET.
How I will add a new record in a access table through ADD NEW() or other
code in
VB.NET (through data entry FORM)?


The necessary connection strings can be found here:

<URL:http://www.connectionstrings.com/>

The rest is similar to inserts into database tables for other DBS.

--
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 #11
On Thu, 03 Feb 2005 09:24:24 GMT, B.Kumar<bi************@yahoo.com> wrote:

¤ I am new commer in VB.NET.
¤ How I will add a new record in a access table through ADD NEW() or other code in
¤ VB.NET (through data entry FORM)?
¤ will you please help for that code, urgently ?
¤ thanking you.

See the following:

HOW TO: Use Microsoft Visual Basic .NET to Connect to a Microsoft Access Database and to Retrieve
Data
http://support.microsoft.com/default...b;en-us;821765
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 21 '05 #12

Well you can use the class if you make it a ComClass with this technique
you are able to use it in anny com capable programming language ( VB6 ,
Delphi , Clipper :-) etc etc
it is also still possible to use it in the normall way in VB.Net


see below example class wich is copied from a reall life project of mine
( ofcourse i have changed the ClassId, InterfaceId and EventsId if someone
might copy it in his own project he won`t break my compatibility , so i
strongly encourage you to change the 3 guids to your own )
<ComClass(ComClsNhsenc.ClassId, ComClsNhsenc.InterfaceId,
ComClsNhsenc.EventsId)> _

Public Class ComClsNhsenc

Public Function strEncrypt(ByVal strToEncrypt As String) As String

' code omitted

End Function

#Region "COM GUIDs"

' These GUIDs provide the COM identity for this class

' and its COM interfaces. If you change them, existing

' clients will no longer be able to access the class.

Public Const ClassId As String = "7BAE16DC-0103-4BA3-9B89-53252272X711"

Public Const InterfaceId As String = "3CE4FCBF-CDEA-4849-9743-0E8E34D313AE"

Public Const EventsId As String = "7E90HE2E-8F8C-45B2-870B-3461A7DF28A7"

#End Region

' A creatable COM class must have a Public Sub New()

' with no parameters, otherwise, the class will not be

' registered in the COM registry and cannot be created

' via CreateObject.

Public Sub New()

MyBase.New()

End Sub

End Class

Happy coding : -)
Michel Posseth [MCP --- and proud of it --- :-) ]

"Supra" <su*****@rogers.com> wrote in message
news:Or**************@TK2MSFTNGP15.phx.gbl...
sure! this will show u how to make dll.
http://www.devcity.net/Articles/87/s...omcontrol.aspx
http://www.devcity.net/Articles/82/s...thebutton.aspx
regards

Phil Galey wrote:
Is it possible to create a DLL from VB.NET that is referenceable from VB6?If so, how? I tried creating a Class Library project. It can be referencedfine from VB.NET, but not from VB6. Thanks.

Nov 21 '05 #13

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

Similar topics

7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
4
by: I_AM_DON_AND_YOU? | last post by:
There is one more problem I am facing but didn't get the solution. In my Setup Program I am not been able to create 2 things (when the program is intalled on the client machine ) : (1) create...
10
by: Zack Sessions | last post by:
Has anyone tried to create a SQL7 view using the CREATE VIEW command and ADO.NET? If so, is there a trick in trapping a SQL error when trying to create the view? I have a VB.NET app that, amoung...
9
by: Peter | last post by:
Hello£¬everyone, My program will collect a testing machine's data ,save the data and deal with the data everyday. I want to use vb.net to create database, add and delete tables or modify the...
37
by: Steven Bethard | last post by:
The PEP below should be mostly self explanatory. I'll try to keep the most updated versions available at: http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt...
18
by: Steven Bethard | last post by:
I've updated the PEP based on a number of comments on comp.lang.python. The most updated versions are still at: http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt...
5
by: Michael | last post by:
Hello, I've created an ASP web page where users in our organization can create Active Directory computer accounts. The web page is running on a Server 2003 SP1 IIS 6 installation. The...
8
by: barb | last post by:
So that the world at large benefits from our efforts, here is one fully documented way to use Windows Irfanview freeware to create thumbnail web galleries (http://www.irfanview.com). STEP 1:...
4
by: JohnnyDeep | last post by:
I am trying to create a store proc that contain a create index with the cluster option and I receive DB21034E The command was processed as an SQL statement because it was not a valid Command...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
1
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.