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

Using COM components

kd
Hi All,

Would anybody be able to help me on how to use COM components in vb.net?

I have a dll and would like to use the functions of the dll. Here are the
steps that I followed:
1. Register the dll
2. Add reference to the dll in the solution explorer

Is there a need to add import statement for the dll in code? Is the
following statement correct?
import <dllname>
or should it be
import <libname>

Thanks.
kd
Nov 21 '05 #1
3 1115
Imports are not needed, they are just to have the code more readable saving
the need for fully qualified type names. The statement is

Imports <namespace>

where <namespace> for COM DLLs is its ProgID
--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
"kd" <kd@discussions.microsoft.com> escribió en el mensaje
news:C8**********************************@microsof t.com...
Hi All,

Would anybody be able to help me on how to use COM components in vb.net?

I have a dll and would like to use the functions of the dll. Here are the
steps that I followed:
1. Register the dll
2. Add reference to the dll in the solution explorer

Is there a need to add import statement for the dll in code? Is the
following statement correct?
import <dllname>
or should it be
import <libname>

Thanks.
kd

Nov 21 '05 #2
kd
Thanks Carlos for your reply.

How do I get the ProgID of the COM DLL?

kd

"Carlos J. Quintero [.NET MVP]" wrote:
Imports are not needed, they are just to have the code more readable saving
the need for fully qualified type names. The statement is

Imports <namespace>

where <namespace> for COM DLLs is its ProgID
--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
"kd" <kd@discussions.microsoft.com> escribió en el mensaje
news:C8**********************************@microsof t.com...
Hi All,

Would anybody be able to help me on how to use COM components in vb.net?

I have a dll and would like to use the functions of the dll. Here are the
steps that I followed:
1. Register the dll
2. Add reference to the dll in the solution explorer

Is there a need to add import statement for the dll in code? Is the
following statement correct?
import <dllname>
or should it be
import <libname>

Thanks.
kd


Nov 21 '05 #3
It is the one that you see in the Object Browser of VB6 when you add the
reference to a VB6 project, there is a combobox to filter ProgIDs.

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
"kd" <kd@discussions.microsoft.com> escribió en el mensaje
news:74**********************************@microsof t.com...
Thanks Carlos for your reply.

How do I get the ProgID of the COM DLL?

kd

Nov 21 '05 #4

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

Similar topics

6
by: Mario T. Lanza | last post by:
Greetings, I don't know about you guys but on many occasions I've asked myself whether or not someone else has solved a particular programming issue -- whether or not they developed a clever...
13
by: Stumped and Confused | last post by:
Hello, I really, really, need some help here - I've spent hours trying to find a solution. In a nutshell, I'm trying to have a user input a value in form's textfield. The value should then be...
3
by: Katrina | last post by:
I am trying to write a piece of code that will search through a number of different tables (current one being tableNm) to look for a specific street name that has been entered by the user and saved...
1
by: Jason Hickey | last post by:
Has there been a change in the way the UI designer handles winform inheritance in the 2003 version of visual studio. Consider the following (try it if you are using 2003 Everything seems to work...
3
by: Todd Schinell | last post by:
Back in July, Jeffery Tan posted this: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=OWOTdf0VDHA.2296%40cpmsftngxa06.phx.gbl In response as to how to get click events from a...
9
by: [Yosi] | last post by:
Can I make an Excel file without having Excel in my PC ? I want to create Excel files from my C# application , then open those files later in another PC who have Excel installed . As we can open...
4
by: Praveen Chandra | last post by:
Hi, I just wanted to put down the issue with more detailed information so that you can help us get to the right Microsoft resource for a solution! Here is the problem description... Our...
1
by: Nicholas Palmer | last post by:
Hi all, Got a question about the AspCompat=true page property. First a little background. We have an ASP.NET app that uses two COM components. The first is the Microsoft OWC 11 components and...
7
by: Olegus | last post by:
Hello, in order to perform backup/restore MSSQL database using SMO, one needs to reference several namespaces in a backup class : using Microsoft.SqlServer.Management.Common; using...
3
by: Michal Lipinski | last post by:
Hi its my first post. I have a problem, I want to user eval() function in a for loop to set labels to staticText so i done something like this: ...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: 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...
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
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?
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.