Renard software dev...
 
Notifications
Clear all

Renard software development

13 Posts
7 Users
0 Reactions
6,622 Views
Posts: 393
Topic starter
(@soakes94)
Honorable Member
Joined: 18 years ago

Ive had a look and I have 5 errors, 3 of them are the same and 2 are different. The first 3 are: "As Any" is not supported in "Declare" statements

The 4th is: "IpBrowseInfo" cannot expose type "BrowseInfo" in namespace "Ren_Console" through module "Module1"

The 5th is: "AddressOf" expression cannot be converted to "Integer" because "Integer" is not a delegate type

I don't know if any of these make sense to anyone but they don't make any sense to me. All the errors are inside Module1, I don't know if that makes a difference or not.

Thanks for all your help 🙂


Reply
Posts: 2168
(@djulien)
Noble Member
Joined: 19 years ago
soakes94 wrote:The first 3 are: "As Any" is not supported in "Declare" statements

"As any" tells VB to allow any data type to be passed for that parameter. If "as any" is not supported in your version of VB, look at which variable types are actually passed for that parameter when the function is called within the rest of the code, and then make a copy of the function declaration and customize it for each of the types needed. For example, if an int is passed to it within the code, edit or clone the declaration and change the parameter type to be an int so it matches. You have to be careful about numeric vs. string params, but if they are always numeric, you can just declare the function that way.

soakes94 wrote:The 4th is: "IpBrowseInfo" cannot expose type "BrowseInfo" in namespace "Ren_Console" through module "Module1"

Type BrowseInfo is declared as private, so it is not exposed outside this module. If you need it to be exposed, declare it as public rather than private.

soakes94 wrote:The 5th is: "AddressOf" expression cannot be converted to "Integer" because "Integer" is not a delegate type

This section of code may be a problem. VB added support for callback-able functions a while back (I don't remember which version), and it sounds like your version of VB pre-dates that. It looks like this code is just trying to display or open a folder. If so, then you could probably just replace that section of code with an OpenFile standard dialog, or if that is not a good match, then maybe just prompt the user to type in a folder rather than displaying a nice GUI to choose it - at least that would get the code running, and then you could go back and fix it up later.

don


Reply
Posts: 255
(@frankv)
Reputable Member
Joined: 17 years ago

These are picky details of VB.Net vs VB6. If you want to translate from VB6 to VB.Net, you're going to need to understand the picky details in BOTH languages. But really, I think you're out of your depth if you need to ask these kinds of questions.

As a first guess, try replacing "As Any" with "As Object".

For the 5th error, try changing the Integer definition to Pointer. Also try a Google for "Addressof VB.NET"

As someone already suggested, it would probably be easier to start from scratch with a simple VB.Net application that does a part of what you want to do (e.g. send messages out to the comm port). Then extend it to handle the Renard protocol. Then add another feature, and another. Just use the original program as a guide.


Reply
Page 3 / 3
Share: