Translate VB6 code to VB 2005
i need help to i'm using vb express 2005 and i dont know what the code for As Any is translated to, i tried to upgrade it from 6.0 but it wont work and i also need to know what the command for App is in vb 2005 express from 6.0
[232 byte] By [
conartist] at [2007-11-11 7:19:25]

# 1 Re: Translate VB6 code to VB 2005
(Unless you're replying to another post, please start a new thread to post a question.)
There is no translation for An Any in VB 2005. Please post the Declare statement you're trying to translate, and how you intend to call the API function.
Which property of the App object do you want to use?
# 2 Re: Translate VB6 code to VB 2005
I'd like to give some suggestions for your questions even i don't have so much ideas for upgrading VB6 to VB.NET 2005.
may be you can use "CodeAdvisor". and Check it out these links...
Upgrading Applications in Visual Basic (http://msdn2.microsoft.com/en-us/library/dy163kx7(en-us,VS.80).aspx)
Walkthrough: Upgrading a Visual Basic 6.0 Application to the Current Version of Visual Basic
(http://msdn2.microsoft.com/en-us/library/zbyth951.aspx)
"As Any" I think it's better if you change it according your situration.. Support : Coming from VBDotNet Team [MS] (http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_frm/thread/7e472e9127b47d29/d4d41050e852d8a0?lnk=st&q=%22As+Any%22+keyword+in+VB6&rnum=1&hl=en#d4d41050e852d8a0), Check the following two functions... you should change "As Any" to "As Interger" in CopyMemory. But you should change "As Any" to "As Byte" in RasEnumEntries Function. So, you need to change the data type depend on which functions you wanna use.
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByRef
Destination As Any, ByRef Source As Any, ByVal Length As Integer)
Public Declare Function RasEnumEntries Lib "rasapi32.dll" Alias
"RasEnumEntriesA"(ByVal lpStrNull As String, ByVal lpszPhonebook As String,
ByRef lpRasEntryName As Any, ByRef lpCb As Integer, ByRef lpCEntries As
Integer) As Integer
App you can use Application
you can use Application.ExecutablePath() instead of App.Path.
more detail...
Application Class (http://http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsapplicationclasstopic.asp)
Application Members (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsapplicationmemberstopic.asp)
App.Path in VB.NET (http://forums.dev-archive.com/showthread.php?t=148101)
I hope it would help. :)
Sync at 2007-11-11 21:50:22 >
