Page 1 of 3 123 LastLast
Results 1 to 40 of 84

Thread: Please Help Create A VB6 to .NET Function Conversion Chart [Completed]

  1. #1

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Please Help Create A VB6 to .NET Function Conversion Chart [Completed]

    Visual Basic 6 to .NET Function Equivalents (Updated 3/19/2006)

    EDIT: Moved the page to my wiki. Now anyone can edit it as they see fit.

    While learning .NET, I realized that the main obstacle was finding out what the .NET equivalent was to every VB 6 function. I have created this chart to help people in my situation. Follow the link above to see the chart. Email me at the link provided there, or post here to give feedback or to tell me about errors.
    Last edited by eyeRmonkey; Mar 9th, 2007 at 12:03 AM. Reason: changed URL
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  2. #2

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    There are only a few left compared to original list. I would be very thankful for any and all help.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  3. #3
    Registered User Vektor's Avatar
    Join Date
    Mar 2006
    Location
    Australia
    Posts
    34

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    I know the rest but i'm going to bed now, 2am lol. During the day tomorrow I will complete it and post it.

  4. #4
    Code Monkey wild_bill's Avatar
    Join Date
    Mar 2005
    Location
    Montana
    Posts
    2,993

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    Quote Originally Posted by eyeRmonkey
    There are only a few left compared to original list. I would be very thankful for any and all help.
    Which are left?

  5. #5

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    Quote Originally Posted by Vektor
    I know the rest but i'm going to bed now, 2am lol. During the day tomorrow I will complete it and post it.
    Thanks. I would really appriciate that.


    Wild Bill, the list in the main post is all that is left. The original list was a lot longer though. I made that comment because I thought the reason no one was replying was because they saw how long the original list was.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  6. #6
    "The" RedHeadedLefty
    Join Date
    Aug 2005
    Location
    College Station, TX Preferred Nickname: Gig Current Mood: Just Peachy Turnons: String Manipulation
    Posts
    4,495

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    Shell - Process.Start
    MsgBox - MessageBox.Show
    Randomize - Random Class
    SavePicture - Image.Save BitMap.Save, etc

    Of course, I dont really have much VB6 knowledge, just thought I would throw those in since I had nothing better to do...

  7. #7

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    I actually had Shell and MsgBox already and forgot to remove them.

    Randomize doesn't exist in the Random class as far as I can tell. Is it even necessary? Or can you just call [System.Random Obejct].Next without the Randomize .NET equivelant (if it exists)?

    Thanks for SavePicture.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  8. #8
    "The" RedHeadedLefty
    Join Date
    Aug 2005
    Location
    College Station, TX Preferred Nickname: Gig Current Mood: Just Peachy Turnons: String Manipulation
    Posts
    4,495

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    Randomize shouldnt be necessary at all if you use the random class, and Random.Next...

    Refer to this thread when I got in trouble for suggesting it
    http://www.vbforums.com/showthread.php?t=363148

  9. #9

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    Cool. I will list it as depricated.

    I was trying to figure out how to find a simple of to accomplish StrReverse in .NET and the best thing that I can come up with is way to long and looks like this:
    VB Code:
    1. Dim MyString As String = "test"
    2.         Dim MyArray As System.Array
    3.         MyArray = MyString.ToCharArray
    4.         Array.Reverse(MyArray)
    5.         MyString = Convert.ToString(MyArray)
    Last edited by eyeRmonkey; Mar 16th, 2006 at 09:41 PM.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  10. #10
    "The" RedHeadedLefty
    Join Date
    Aug 2005
    Location
    College Station, TX Preferred Nickname: Gig Current Mood: Just Peachy Turnons: String Manipulation
    Posts
    4,495

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    You can simply loop the chars of the string, and just append it to the front of the result string, like below:
    VB Code:
    1. Dim MyString As String = "ReverseMe"
    2.         Dim ReverseString As String = ""
    3.         For Each Letter As Char In MyString
    4.             ReverseString = Letter & ReverseString
    5.         Next
    6.         MessageBox.Show(ReverseString)
    Its the same code length (since you didnt put a messagebox displaying the variable above), but doesn't require converting them to an array, or temp array, etc...
    Last edited by gigemboy; Mar 16th, 2006 at 09:43 PM.

  11. #11

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    I was trying to put this all in a spreadsheet and I don't want to put 5 lines of code. I suppose I could just put "use a loop" or something.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  12. #12
    "The" RedHeadedLefty
    Join Date
    Aug 2005
    Location
    College Station, TX Preferred Nickname: Gig Current Mood: Just Peachy Turnons: String Manipulation
    Posts
    4,495

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    hehe well Im not sure if there is a shorter way without using the runtime function, you can always do this if needed:
    VB Code:
    1. For Each Letter As Char In MyString : ReverseString = Letter & ReverseString : Next
    That enables you to put everything in one line in the IDE (seperating them with a colon), and gives you one line to put in your spreadsheet....

  13. #13

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    How about these: ChDir, ChDrive, CurDir. Directories don't even work that way in .NET do they? In VB6 your kind of had a directory that it was "focused" on and whenever you did any directory actions, it would automatically happen to that directory. In .NET you need have the whole directory class. Any idea how to convert those?

    Oh, I just found these one:
    CurDir = [IO.Directory Object].GetCurrentDirectory
    ChDir = [IO.Directory Object].SetCurrentDirectory
    Last edited by eyeRmonkey; Mar 16th, 2006 at 09:51 PM.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  14. #14
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    Heres DIR Folders
    VB Code:
    1. For Each Dir As String In IO.Directory.GetDirectories("C:\")
    2.             Debug.Print(Dir)
    3.         Next

    Heres DIR Files
    VB Code:
    1. For Each Dir As String In IO.Directory.GetFiles("C:\")
    2.             Debug.Print(Dir)
    3.         Next

    File Exists
    VB Code:
    1. If IO.File.Exists("C:\a.bat") = True Then
    2.             Debug.Print("True")
    3.         End If

    Len = String.Length

    Easy Read/Write

    VB Code:
    1. My.Computer.FileSystem.ReadAllText("C:\a.txt")
    2.         My.Computer.FileSystem.WriteAllText("C:\a.txt", "Today", False)

    About all I got that could interest you

  15. #15

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    Thanks Remix!

    How about Len when used with data types? It tells you the number of bytes that object/type takes up.

    My keyword is only in .NET 2005. I would like to keep this more universal. I like the ability to read/write a file in one line though! Is there anyway to do it in one line in other versions of .NET.


    Anyone have any idea how to do Hex or Oct (or Binary even though it didn't exist in VB6) using .NET? I get the feeling they might not exist anymore.


    Also, what is the difference between Fix and Int in VB6? And what is the best way to do that in .NET? All I could come up with is Convert.ToInt32 or Math.Round.


    Does InputBox exist anymore?

    PS - It is Debug.Write or Debug.WriteLine. Debug.Print was so two years ago!
    Last edited by eyeRmonkey; Mar 16th, 2006 at 10:27 PM.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  16. #16
    Code Monkey wild_bill's Avatar
    Join Date
    Mar 2005
    Location
    Montana
    Posts
    2,993

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    Windows.Forms.Application.DoEvents() 'DoEvents
    Convert.ToChar(26) 'EOF
    Int32.ToString("x") 'Hex
    String.Join("", s()) 'Join

  17. #17

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    Thanks Wild Bill. The only one that doesn't work is EOF. In VB6 EOF returned a boolean value telling you if a specified file had reach the end of the file or not. I know VB .NETs setup for files is totally different, but can we find something similar?
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  18. #18

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    I think I will just list EOF as "[StreamReader Object].Peek = -1"
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  19. #19
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    Try,
    VB Code:
    1. Debug.Print(Int16.MaxValue.ToString)

  20. #20
    Code Monkey wild_bill's Avatar
    Join Date
    Mar 2005
    Location
    Montana
    Posts
    2,993

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    something like this might work
    VB Code:
    1. Const EOF As String = Nothing
    2.         Dim sr As New IO.StreamReader("c:\temp\test.txt")
    3.         Dim line As String = sr.ReadLine
    4.         While line <> EOF
    5.             line = sr.ReadLine
    6.         End While
    7.         sr.Close()

  21. #21

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    Quote Originally Posted by |2eM!x
    Try,
    VB Code:
    1. Debug.Print(Int16.MaxValue.ToString)
    Len told you how many bytes something was. Plus its main use was for Objects that you created yourself. For example, if you made your own class and had an instance of it, you could figure out how many bytes the structure took up. Should I list it as depricated?
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  22. #22
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    No idea..Never used/needed it, sorry.

    edit* cant you get the number I gave you, /2 and get the bytes?

  23. #23

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    You can, but that only applies to objects/data types that have a MaxValue property.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  24. #24
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    The equivelent of Len is Marshal.SizeOf() I believe. Atleast in some cases. That is what I have replaced Len with when woking with APIs.
    Visual Studio Team Edition 2005
    GDI+ Links: Bob Powell VB.Net Heaven
    API Links: All API Pinvoke.Net
    VB6 to VB.Net: Visual Basic 6 to .NET Function Equivalents (Thread)

  25. #25
    Fanatic Member
    Join Date
    May 2005
    Posts
    898

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    Yeah, I totally told you so.
    "so just keep in mind that fantasy is not the same as realtiy and make sure u remember that wii sports may be fun but u cant count on it as exercise ok cool bye" - HungarianHuman

  26. #26
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    Environ is now Environment
    Reflection replaces CallByName According to this
    Visual Studio Team Edition 2005
    GDI+ Links: Bob Powell VB.Net Heaven
    API Links: All API Pinvoke.Net
    VB6 to VB.Net: Visual Basic 6 to .NET Function Equivalents (Thread)

  27. #27

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    I don't really know how CallByName worked in VB6, but can you point mew towards to a specific part of the Reflection class?
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  28. #28
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    Here's an example
    VB Code:
    1. Dim t As Type = GetType (TestClass)
    2.  
    3. '  BindingFlags has three bitor'ed elements. Default indicates that
    4.         '  default binding rules should be applied.
    5.         t.InvokeMember ("SayHello", _
    6.                 BindingFlags.Default BitOr BindingFlags.InvokeMethod _
    7.                 BitOr BindingFlags.Static, nothing, _
    8.                 nothing, new object () {})

    This calls a method named SayHello.

    You have to import system.Reflection then Call InvokeMethod on a type.

    I got the example from here.
    Visual Studio Team Edition 2005
    GDI+ Links: Bob Powell VB.Net Heaven
    API Links: All API Pinvoke.Net
    VB6 to VB.Net: Visual Basic 6 to .NET Function Equivalents (Thread)

  29. #29

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    So would It be fair to list CallByName like this?

    [Type Object].InvokeMember

    I plan to link each line of the chart to a good example or page on MSDN so I think that will be enough info. Do you agree?
    Last edited by eyeRmonkey; Mar 17th, 2006 at 05:43 PM.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  30. #30
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    I think that might be the only way to show it nicely, and complete.
    Visual Studio Team Edition 2005
    GDI+ Links: Bob Powell VB.Net Heaven
    API Links: All API Pinvoke.Net
    VB6 to VB.Net: Visual Basic 6 to .NET Function Equivalents (Thread)

  31. #31

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    (I just edited it. Do you still agree that is the best way to post it? As long as I link it to and example.)

    That only leaves Oct. I did Hex like this: [Integer Object].ToString("x") but I don't know how to do that with Oct.

    Also I need to find a good way of listing all the depricated functions. I want to put a comment next to every depricated function that at least gives some info about it or points the user in a good direction if that is what they are looking for.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  32. #32
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    Current way is better. Maybe have an astrics with a note at the bottom that says may require importing a namespace. Check MSDN for requirements? Something tlike that? Because another one that requires an imports statement is marshal.SizeOf.
    Visual Studio Team Edition 2005
    GDI+ Links: Bob Powell VB.Net Heaven
    API Links: All API Pinvoke.Net
    VB6 to VB.Net: Visual Basic 6 to .NET Function Equivalents (Thread)

  33. #33

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Please Help Create A VB6 to .NET Function Conversion Chart

    Oddly, neither of those require a reference for me. The following work without references:
    VB Code:
    1. Runtime.InteropServices.Marshal.SizeOf
    2. ' AND ...
    3. Dim t as Type = GetType(MyType)
    4. t.InvokeMember

    Well they don't WORK, but they pop up form Intellisense. I havn't actually tried either of them though. I only have the default imports set up.

    Everything will be linked to MSDN so that should suffice for this one.


    Does anyone have any ideas for Oct or for the ones I have listed as depricated? Like I said, I want to put a note next to each depricated one that gives the user an idea of where to head. For example, next to Err I put "(Depricated - Use Try ... Catch ... Finally statement and Exception object instead)." I need help finding things like that for all the depricated functions.
    Last edited by eyeRmonkey; Mar 17th, 2006 at 08:27 PM.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  34. #34

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Please Help Create A VB6 to .NET Function Conversion Chart [Almost Done]

    Here is a rough draft. Almost everything is linked to MSDN. I would really appriciate it if everyone could skim over it and make sure everything is valid.

    EDIT: I moved the link to the first post.
    Last edited by eyeRmonkey; Mar 18th, 2006 at 01:46 PM.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  35. #35
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: Please Help Create A VB6 to .NET Function Conversion Chart [Almost Done]

    What Depricated means?
    About StrReverse, why to loop in .Net if it still works as in VB6?
    Or you don't want nothing from Microsoft.VisualBasic?

  36. #36
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Please Help Create A VB6 to .NET Function Conversion Chart [Almost Done]

    Deprecated

    SendKeys = Application.SendKeys

  37. #37

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Please Help Create A VB6 to .NET Function Conversion Chart [Almost Done]

    Quote Originally Posted by jcis
    What Depricated means?
    About StrReverse, why to loop in .Net if it still works as in VB6?
    Or you don't want nothing from Microsoft.VisualBasic?
    Deprecated (as Penagate pointed out) means out of date and obselete.

    As far as StrReverse, the whole point of this table is to help people avoid using the Microsoft.VisualBasic namespace. The idea is to help people get out of their old "VB 6 habbits" and into a more object oreiented approach.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  38. #38
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    Re: Please Help Create A VB6 to .NET Function Conversion Chart [Almost Done]

    There's nothing wrong with the Microsoft.VisualBasic namespace.

    I use VB 6, VB.Net 2003 and Office 2010



    Code:
    Excel Graphing | Excel Timer | Excel Tips and Tricks | Add controls in Office | Data tables in Excel | Gaussian random number distribution (VB6/VBA,VB.Net) | Coordinates, Vectors and 3D volumes

  39. #39

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Please Help Create A VB6 to .NET Function Conversion Chart [Almost Done]

    Technically that is true, but you have to agree that an OO approach is better than being stuck to your old VB6 habbits.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  40. #40

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Please Help Create A VB6 to .NET Function Conversion Chart [Rouch Draft Available]

    Okay, the most recent version is linked in the first post. If no one else has any comments I will polish it up and give you guys the final link. Hopefully a few people will be willing to link to it in their signatures and we can help people stop using the Microsoft.VisualBasic namespace.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width