Click here to Skip to main content
15,844,156 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Extracting from DLLs Pin
MatrixCoder2-Mar-07 4:26
MatrixCoder2-Mar-07 4:26 
GeneralMaybe Someone else can help. Pin
The ANZAC2-Mar-07 17:21
The ANZAC2-Mar-07 17:21 
GeneralRe: Extracting from DLLs [modified] Pin
TwoFaced2-Mar-07 20:23
TwoFaced2-Mar-07 20:23 
GeneralRe: Extracting from DLLs Pin
MatrixCoder3-Mar-07 6:42
MatrixCoder3-Mar-07 6:42 
QuestionSmall Project - Looking For Community Input Pin
Ian Woods28-Feb-07 15:45
Ian Woods28-Feb-07 15:45 
QuestionPLEASE HELP :( Pin
İsmail Durmaz28-Feb-07 11:42
İsmail Durmaz28-Feb-07 11:42 
QuestionVb Forms and Crystal Reports Pin
China-Gary28-Feb-07 10:45
China-Gary28-Feb-07 10:45 
QuestionVB6.0 -> VB.NET conversion (A question about COM references) Pin
BRShroyer28-Feb-07 9:45
BRShroyer28-Feb-07 9: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 11:04
protectorChristian Graus28-Feb-07 11:04 
QuestionReading Excel Data with VB.NET 2005 Pin
Jawa200628-Feb-07 9:41
Jawa200628-Feb-07 9:41 
Questionhow can we add winsock control in our vb.net application Pin
onrivman28-Feb-07 6:53
onrivman28-Feb-07 6:53 
AnswerRe: how can we add winsock control in our vb.net application Pin
Tim Carmichael28-Feb-07 9:05
Tim Carmichael28-Feb-07 9:05 
QuestionColor DataGridView cell on exception Pin
penguin500028-Feb-07 6:06
penguin500028-Feb-07 6:06 
Newsselectin in combobox........ Pin
manni_n28-Feb-07 3:43
manni_n28-Feb-07 3:43 
GeneralRe: selectin in combobox........ Pin
CPallini28-Feb-07 5:42
mveCPallini28-Feb-07 5:42 
QuestionRe: selectin in combobox........ Pin
manni_n28-Feb-07 7:35
manni_n28-Feb-07 7:35 
AnswerRe: selectin in combobox........ Pin
CPallini28-Feb-07 10:02
mveCPallini28-Feb-07 10:02 
QuestionCrystal reports Problem in vb.net2005 Pin
amaneet28-Feb-07 3:35
amaneet28-Feb-07 3:35 
Questionapplication.Run Pin
amaneet28-Feb-07 3:19
amaneet28-Feb-07 3:19 
AnswerRe: application.Run Pin
Colin Angus Mackay28-Feb-07 5:07
Colin Angus Mackay28-Feb-07 5:07 
QuestionImplicit and explicit conversion Pin
amaneet28-Feb-07 3:14
amaneet28-Feb-07 3:14 
AnswerRe: Implicit and explicit conversion Pin
Bassam Saoud28-Feb-07 4:47
Bassam Saoud28-Feb-07 4:47 
Questionhow to add click event on button twice? Pin
bhawna_k28-Feb-07 3:10
bhawna_k28-Feb-07 3:10 
AnswerRe: how to add click event on button twice? Pin
CPallini28-Feb-07 5:40
mveCPallini28-Feb-07 5:40 
AnswerRe: how to add click event on button twice? Pin
Dave Kreskowiak28-Feb-07 5:45
mveDave Kreskowiak28-Feb-07 5: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.