Click here to Skip to main content
15,916,091 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: how to force fully change resolution of system Pin
ram krishna pattnayak1-Mar-07 23:46
ram krishna pattnayak1-Mar-07 23:46 
GeneralRe: how to force fully change resolution of system Pin
Dave Kreskowiak2-Mar-07 14:25
mveDave Kreskowiak2-Mar-07 14:25 
Questionsimple flash animation Pin
ram krishna pattnayak28-Feb-07 20:14
ram krishna pattnayak28-Feb-07 20:14 
Questionsimple flash animatio Pin
ram krishna pattnayak28-Feb-07 20:14
ram krishna pattnayak28-Feb-07 20:14 
AnswerRe: simple flash animatio Pin
samerh28-Feb-07 22:03
samerh28-Feb-07 22:03 
Questioncreate sql database Pin
taherjaorawala28-Feb-07 19:34
taherjaorawala28-Feb-07 19:34 
AnswerRe: create sql database Pin
andyharman1-Mar-07 3:19
professionalandyharman1-Mar-07 3:19 
Questionerror while inserting memo field Pin
balakpn28-Feb-07 17:57
balakpn28-Feb-07 17:57 
AnswerRe: error while inserting memo field Pin
Guffa28-Feb-07 21:20
Guffa28-Feb-07 21:20 
GeneralRe: error while inserting memo field Pin
balakpn1-Mar-07 1:28
balakpn1-Mar-07 1:28 
QuestionInsert Data table data to SQL table Pin
nawalage28-Feb-07 17:42
nawalage28-Feb-07 17:42 
AnswerWrong Forum? Pin
CPallini28-Feb-07 21:14
mveCPallini28-Feb-07 21:14 
QuestionExtracting from DLLs Pin
MatrixCoder28-Feb-07 15:06
MatrixCoder28-Feb-07 15:06 
AnswerRe: Extracting from DLLs Pin
The ANZAC28-Feb-07 19:48
The ANZAC28-Feb-07 19:48 
GeneralRe: Extracting from DLLs Pin
MatrixCoder1-Mar-07 5:34
MatrixCoder1-Mar-07 5:34 
GeneralRe: Extracting from DLLs Pin
MatrixCoder1-Mar-07 16:54
MatrixCoder1-Mar-07 16:54 
GeneralRe: Extracting from DLLs Pin
The ANZAC1-Mar-07 19:00
The ANZAC1-Mar-07 19:00 
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

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.