VB6 - VB.Net translation help required.

Tissy

New member
Joined
Sep 22, 2005
Messages
4
Programming Experience
Beginner
I have a piece of code, fairly simple really, which has 1 form and 1 module. At the moment it is all working in VB6. It is an interface program which allows VB to talk to one of the Microchip USB family microcontrollers (18F4550) as a HID interface.

The code has been generated by a third party application, which only generates code for VB6.

I have tried translating this code over to VB.Net with little success.

There really doesn't seem a lot to it, however my level of knowledge at this stage on VB.Net is poor to say the least.

Is anyone willing to look at this piece of code for me and see if they can get it working in VB.Net. It displays the error:

'AddressOf' expression cannot be converted to 'Integer' because 'Integer' is not a delegate type.

Any help would be greatfully appriciated as it would be a good starting block for me to continue learning and developing this application using VB.Net instead of VB6.

Many thanks,

Steve Tisseyre
 
That was a quick reply, thank you.

I have attached a rar which contains the working VB6 code and the working exe.

Basically at the moment the program works that when you click one button it sends a command to the HID, you click the other button and it sends a different command to the HID. Simple stuff to start with. The PIC then interprits these commands and performs its own functions.

The problem i am having is with the module bas file.

All is attached and thanks very much again for any help.

Regards,

Steve
 

Attachments

  • HID Controller.zip
    11.6 KB · Views: 28
Translation of Code

Hello there,

I saw the application. I think the code is easy enough to translate. The problem in my opinion lies with the declaration that you have made for the DLLs.

Can you show me the declares that you have made for the DLLs in VB.Net?

Maybe you can post a similar zip file with the .Net code...

Cheers
 
Hi all and thanks for your interest.

Please find attached the requested code. This is in vb.net format, however after it has been translated from VB6 using the upgrade wizard in VB.net. This is the only method i have at the moment to get some way of my code into VB.net.

As i say, most of the initial bits of the form are fairly simple, it is just the module file that needs the attention i think.

Thanks again,

Steve
 

Attachments

  • USB_HID_Controller.NET.zip
    30.4 KB · Views: 31
Back
Top