Click here to Skip to main content
15,886,919 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Extracting from DLLs Pin
MatrixCoder2-Mar-07 3:26
MatrixCoder2-Mar-07 3:26 
GeneralMaybe Someone else can help. Pin
The ANZAC2-Mar-07 16:21
The ANZAC2-Mar-07 16:21 
GeneralRe: Extracting from DLLs [modified] Pin
TwoFaced2-Mar-07 19:23
TwoFaced2-Mar-07 19:23 
GeneralRe: Extracting from DLLs Pin
MatrixCoder3-Mar-07 5:42
MatrixCoder3-Mar-07 5:42 
QuestionSmall Project - Looking For Community Input Pin
Ian Woods28-Feb-07 14:45
Ian Woods28-Feb-07 14:45 
QuestionPLEASE HELP :( Pin
İsmail Durmaz28-Feb-07 10:42
İsmail Durmaz28-Feb-07 10:42 
QuestionVb Forms and Crystal Reports Pin
China-Gary28-Feb-07 9:45
China-Gary28-Feb-07 9:45 
QuestionVB6.0 -> VB.NET conversion (A question about COM references) Pin
BRShroyer28-Feb-07 8:45
BRShroyer28-Feb-07 8:45 
I am having difficulty. I tried to figure how to describe it in one sentence, but couldn't.

We have a supplier who supplies what they call a PC Developer Kit. In VB6.0, it allows you to add a project reference (it is linked to an .exe). This would give you access to several data types that you can use to get information from their equipment via an Ethernet connection. I'm using the following statement in VB6.0:

Dim Robot1 as Robot<br />
Dim ioDIN as ioType<br />
<br />
Set Robot1 = New Robot<br />
Set ioDIN = Robot1.IOTypes(DigInType).Signals.Item(Index:=0)


I'm trying to figure out 1) if it possible to use this in .NET, and 2) if so, how.

I've tried (VB.NET code):
Dim Robot1 as Robot<br />
Dim ioDIN as ioType<br />
<br />
Robot1 = New Robot<br />
ioDIN = Robot1.IOTypes(DigInType).Signals.Item(0)


I get an unhandled COM exception with "Illegal port number" and it is pointing to the 0.

Then I tried (VB.NET code):
Dim Robot1 as Robot<br />
Dim ioDIN as ioType<br />
<br />
Robot1 = New Robot<br />
ioDIN = Robot1.IOTypes(DigInType).Signals.Item(1)


I get the error: Unable to cast COM object of type 'System.__ComObject' to interface type 'Robot.IOType'. Now it is pointing to the 1.

What is going on when you reference an .exe? How does it give you access to new data types? I'm not sure what the (Index:=0) is exactly doing in the VB6.0 code and why it needs to be that way. I did find out that I can make it work the same by changing it to (1). Is there a way to convert the code to something that would work in VB.NET?

Any help with any part of this is appreciated.

Brad

The secret to creativity is knowing how to hide your sources. - Albert Einstein

AnswerRe: VB6.0 -> VB.NET conversion (A question about COM references) Pin
Christian Graus28-Feb-07 10:04
protectorChristian Graus28-Feb-07 10:04 
QuestionReading Excel Data with VB.NET 2005 Pin
Jawa200628-Feb-07 8:41
Jawa200628-Feb-07 8:41 
Questionhow can we add winsock control in our vb.net application Pin
onrivman28-Feb-07 5:53
onrivman28-Feb-07 5:53 
AnswerRe: how can we add winsock control in our vb.net application Pin
Tim Carmichael28-Feb-07 8:05
Tim Carmichael28-Feb-07 8:05 
QuestionColor DataGridView cell on exception Pin
penguin500028-Feb-07 5:06
penguin500028-Feb-07 5:06 
Newsselectin in combobox........ Pin
manni_n28-Feb-07 2:43
manni_n28-Feb-07 2:43 
GeneralRe: selectin in combobox........ Pin
CPallini28-Feb-07 4:42
mveCPallini28-Feb-07 4:42 
QuestionRe: selectin in combobox........ Pin
manni_n28-Feb-07 6:35
manni_n28-Feb-07 6:35 
AnswerRe: selectin in combobox........ Pin
CPallini28-Feb-07 9:02
mveCPallini28-Feb-07 9:02 
QuestionCrystal reports Problem in vb.net2005 Pin
amaneet28-Feb-07 2:35
amaneet28-Feb-07 2:35 
Questionapplication.Run Pin
amaneet28-Feb-07 2:19
amaneet28-Feb-07 2:19 
AnswerRe: application.Run Pin
Colin Angus Mackay28-Feb-07 4:07
Colin Angus Mackay28-Feb-07 4:07 
QuestionImplicit and explicit conversion Pin
amaneet28-Feb-07 2:14
amaneet28-Feb-07 2:14 
AnswerRe: Implicit and explicit conversion Pin
Bassam Saoud28-Feb-07 3:47
Bassam Saoud28-Feb-07 3:47 
Questionhow to add click event on button twice? Pin
bhawna_k28-Feb-07 2:10
bhawna_k28-Feb-07 2:10 
AnswerRe: how to add click event on button twice? Pin
CPallini28-Feb-07 4:40
mveCPallini28-Feb-07 4:40 
AnswerRe: how to add click event on button twice? Pin
Dave Kreskowiak28-Feb-07 4:45
mveDave Kreskowiak28-Feb-07 4:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.