Page 2 of 3 FirstFirst 123 LastLast
Results 41 to 80 of 84

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

  1. #41
    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 [Rouch Draft Available]

    Oct?
    Convert.ToString(New Integer, 8)

  2. #42
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

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

    Quote Originally Posted by eyeRmonkey
    Technically that is true, but you have to agree that an OO approach is better than being stuck to your old VB6 habbits.
    I don't like using Runtime functions if there is a better alternative but this is not a valid argument. VB.NET is a 100% OO language. It is not possible to do anything in VB.NET that is not OO. Using a Runtime function is no different to using a Shared member of a class.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #43
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

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

    There is no possible replacement for IIf in VB.NET except a full If...Then...Else...End If block.

    I don't know how SendKeys works in VB6 but I'd assume that the SendKeys class provides the equivalent functionality and probably more.
    Quote Originally Posted by penagate
    SendKeys = Application.SendKeys
    I think you just made that up.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #44
    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 [Rouch Draft Available]

    Yes, it looks very much as though I did.

  5. #45

    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 jmcilhinney
    I don't like using Runtime functions if there is a better alternative but this is not a valid argument. VB.NET is a 100% OO language. It is not possible to do anything in VB.NET that is not OO. Using a Runtime function is no different to using a Shared member of a class.
    I knew someone would dispute me on that one. I don't know how to phrase it so it is "technically correct," but I think you know what I mean. Why use VB6 functions (even though they are now part of the .NET framework) when there is a .NET approach.

    Yeah, I figured out what you meant Penagate. SendKeys.Send() functions does the job.

    Thanks everyone. I will be posting a new version in a few minutes.
    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. #46
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

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

    I absolutely hate using SendKeys in either VB6 or VB.NET. It should have never been invented. The most flakey of all methods of all time!

    Use unmanaged code (APIs) to do it reliably.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #47
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

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

    Quote Originally Posted by RobDog888
    I absolutely hate using SendKeys in either VB6 or VB.NET. It should have never been invented. The most flakey of all methods of all time!

    Use unmanaged code (APIs) to do it reliably.
    I'm with you Rob. Given that SendKeys acts on the control that currently has focus and that there is no way to guarantee what the active control is at any time, the result of SendKeys cannot be predicted with an acceptable level of certainty.

    I don't use Runtime functions if I can avoid it for the following reasons:

    1. They are often (although not always) less efficient than System-based alternatives.
    2. They often call the very members that you would normally use to replace them (e.g. MsgBox and MessageBox.Show) so why add the extra layer? This is also a contributor to reason 1.
    3. Their behaviour is sometimes what I would consider idiosyncratic, e.g. Val().
    4. They are often abominably named. Who would know what Fix() does without looking it up? The naming conventions in the .NET Framework make a lot of code self-documenting.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  8. #48
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

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

    Sorry EM, but this guy has done what your doing but for VB6 > VB.NET & C#. Good stuff too.

    http://www.codeproject.com/dotnet/vb...difference.asp
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  9. #49
    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 [Rouch Draft Available]

    Quote Originally Posted by RobDog888
    Sorry EM, but this guy has done what your doing but for VB6 > VB.NET & C#. Good stuff too.

    http://www.codeproject.com/dotnet/vb...difference.asp
    I don't see the VB6 part

  10. #50
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

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

    neither do I

    Nevermind, but it is a helpful link for VB to C#
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

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

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

    Quote Originally Posted by RobDog888
    neither do I

    Nevermind, but it is a helpful link for VB to C#
    Thanks for the helpful vb to c# link then RD

  12. #52

    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 [Final Draft]

    Good link anyway RD. Thanks.

    Okay, the updated (and hopefully near final) version is posted. Enjoy.
    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

  13. #53
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

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

    I read your final list and I want to point out that CStr, CInt, etc. are NOT members of the Microsoft.Visualbasic namespace. Notice that they turn blue in the IDE, indicating that they are VB.NET keywords. They are part of the VB.NET language itself, so I for one certainly do not equate their use with the use of Runtime functions.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  14. #54

    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 [Final Draft]

    Hmmm. I didn't know that. So what are they then? Okay, I know I started a thread on this subject already and I know it goes back to casting and what not. Is that the reason they exist in two similar forms? One for casting and one for doing it the other way?
    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

  15. #55
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

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

    CInt, CStr, etc. existed in VB6 and earlier and behaved a certain way. I believe they still behave that same way, but they are VB.NET keywords and are compiled inline rather than creating a function call. Their functionality includes some of what C-style casting provides, which didn't exist in VB6, and some of what the Convert class and similar things provide, although they do not necessarily work the same way. This is the reason I like to use them for casting and Convert or the like for actually converting objects. That is a matter of personal preference but I believe that it helps to keep things more consistent, particularly if you also use C# where you will use a genuine cast where appropriate and a conversion otherwise.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  16. #56

    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 [Final Draft]

    Well, I still don't understand the whole concept of casting, but that isn't the topic of this thread, so I will remove them from the list because they are all fairly obvious and because you have a point. Thanks.
    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

  17. #57

    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 [Final Draft]

    If you guys wouldn't mind, I think it would be helpful to link to either this thread or the table in your signatures. I think it will solve a lot of simple problems that people run into when switching from VB6 to .NET. Thanks.
    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. #58
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

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

    I've noticed some erros in the section including FormatDateTime and the like. If you want to use the String.Format method then you do NOT call it on a String object because it is a Shared method. The old Format function is replaced by String.Format where you call it on the class, not an instance. As for the others, you could use String.Format but it would be more correct to do as follows:

    FormatCurrency => myNumber.ToString("c")
    FormatDateTime => myDate.ToLongDateString, .ToShortDateString, .ToLongTimeString, .ToShortDateString, .ToString(formatString)
    FormatNumber => myNumber.ToString(formatString)
    FormatPercent => myNumber.ToString("p")

    Take a look at these links to see what sort of values formatString can take.

    Standard DateTime Formats
    Standard Number Formats
    Custom Number Formats
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  19. #59
    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 [Final Draft]

    Quote Originally Posted by eyeRmonkey
    If you guys wouldn't mind, I think it would be helpful to link to either this thread or the table in your signatures. I think it will solve a lot of simple problems that people run into when switching from VB6 to .NET. Thanks.
    I must insist that you fix the appalling Word-generated HTML code!

  20. #60

    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 [Final Draft]

    Quote Originally Posted by penagate
    I must insist that you fix the appalling Word-generated HTML code!
    Shhhhhhhhh!

    I was feeling lazy. I moved it to appalling FrontPage-generated HTML code.

    JMC, could you explain how/when/why I would call format on a class? I'm not sure I follow you on that one.

    EDIT: I updated the page. Does it look more correct JMC?
    Last edited by eyeRmonkey; Mar 20th, 2006 at 10:59 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

  21. #61
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

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

    Quote Originally Posted by eyeRmonkey
    JMC, could you explain how/when/why I would call format on a class? I'm not sure I follow you on that one.
    If you have a single object that you want to convert to a string and specify a format then you would normally call the ToString method of that object. If you want to insert an object into a string at a specific point or you have multiple object s that you want to put into a string then you would normally use String.Format. String.Format allows you to specify the same format strings that you can pass to ToString.
    Quote Originally Posted by eyeRmonkey
    I updated the page. Does it look more correct JMC?
    There's still an error with Format. String.Format is a Shared method so you don't call it on a String object, but rather on the String class itself, i.e.

    Format => [String object].Format 'this is wrong.
    Format => String.Format 'this is correct.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  22. #62

    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 [Final Draft]

    Nevermind. I understand now. That totally makes sense. I knew that, I just wasn't making the connection for some reason. Thanks.

    (If I could rep you as much as you deserved it, my finger would be bruised. )


    EDIT: I know this sounds ridiculous, but would the proper way to acheive the VB6 equivalent of Format be to do [String Object].ToString([Format String Here])? Or is there a way that seems less... odd? String.Format() doesn't do the same thing as in .NET as it did in VB6, so I can't list it as the equivalent.
    Last edited by eyeRmonkey; Mar 21st, 2006 at 01:48 AM.
    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

  23. #63
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

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

    Quote Originally Posted by eyeRmonkey
    EDIT: I know this sounds ridiculous, but would the proper way to acheive the VB6 equivalent of Format be to do [String Object].ToString([Format String Here])? Or is there a way that seems less... odd? String.Format() doesn't do the same thing as in .NET as it did in VB6, so I can't list it as the equivalent.
    I hadn't previously looked to see what the Format function did. It just seems to be a more generalised version of FormatCurrency, FormatDateTime, etc., so the equivalent would be something like [Object].ToString([Format String Here]) because it's a date or number that you're converting to a string.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  24. #64

    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 [Final Draft]

    Yeah, that makes sense. I was thinking I needed to specify exactly what the [Object] was, but keeping it generalized works fine. I'll upload the new version now.
    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

  25. #65
    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 [Final Draft]

    Quote Originally Posted by eyeRmonkey
    Shhhhhhhhh!

    I was feeling lazy. I moved it to appalling FrontPage-generated HTML code.
    OK.

    Take 3 steps back.

    Now put the FrontPage down. Slowly.

    http://penagate.spiralmindsinc.com/misc/functions.html

    (You might need to update the content slightly )

  26. #66

    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 [Final Draft]

    *bursts into tears*

    ... It's so ... Beautiful.

    I was actually going to ask if someone would be willing to make it look nice for me. Did you hand code that? Or did you use an editor? It looks awesome. I wish I could rep you right now. Thanks!
    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

  27. #67
    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 [Final Draft]

    No problemo

    Hand code I use Notepad++.

    Move the CSS to a stylesheet if you want to save some more bandwidth, along with the savings from lack of Frontpage/Word muck


    Edit: Mighta missed a few "deprecated"'s somewhere

  28. #68

    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 [Final Draft]

    Penagte, I must say, you are an artist at heart. You have a gift for that kind of thing. I can code with the best of them, but I'm not much of a designer. I'm not horrible, but I am far form amazing.

    Good work, I'll check out stuff and make sure it is all up to date.
    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

  29. #69
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

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

    I just noted that you have not provided a replacement for Oct. You can use Convert.ToString([Integer], 8) to create an octal representation of a number and Convert.ToInt32([String], 8) to create a number from an octal string. The same thing works with bases 2, 10 and 16.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  30. #70

    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 [Final Draft]

    Yeah, I had it updated at some point, and it got lost between updates or something. Thanks.
    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

  31. #71
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

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

    Quote Originally Posted by eyeRmonkey
    Yeah, I had it updated at some point, and it got lost between updates or something. Thanks.
    Ah, i looked a penagate's version I think. It's his fault.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  32. #72

    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 [Final Draft]



    The link in the first post now leads to the updated version with Penagate's design.
    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

  33. #73
    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 [Final Draft]

    What on earth happened to my poor code layout

  34. #74
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

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

    Int() is equivalent to Math.Floor(). Fix() is NOT equivalent to Math.Floor(). Fix behaves like Math.Floor for positive numbers and Math.Ceiling for negative numbers. The closest thing to Fix is Decimal.Truncate, but that only acts on Decimals, not Doubles or Singles.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  35. #75

    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 [Final Draft]

    Thanks agian. I didn't think that was right, but I didn't know exactly what Fix did, so I just put Math.Floor there. Fix sounds like the greatest integer function (from math).
    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

  36. #76

    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 [Final Draft]

    Quote Originally Posted by penagate
    What on earth happened to my poor code layout


    It is still just the way you left it.

    I even kept your random use of capitalization and what not. Hehe.

    Looks great Penagate. Thanks again.
    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

  37. #77
    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 [Final Draft]

    Eh... my source code is completely different...

    Somehow your version manages to have the same effect, but with added, as you say, random capitalisation and what not.

    In case your View Source function is malfunctioning, here's the original code
    http://penagate.spiralmindsinc.com/misc/functions.htmls

  38. #78

    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 [Final Draft]

    :sigh: Somehow the way I saved it screwed it up. The actual code looks perfect (as proper XHTML should - even though you have HTML 4.01 as your doc type). Anyway, I don't really want to make all the changes again just so the source looks nice, but I might if it isn't too much trouble.

    Also, I changed the URL, so if anyone bookmarked it or something you will need to change it. Sorry for any trouble that causes, but I wanted to make it easy to remember and an ASP page so I could add other functionality later.
    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

  39. #79
    Hyperactive Member
    Join Date
    Sep 2004
    Posts
    262

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

    Thanks for all your work, have added it to my favourites as am always getting confused with Vb6 and .net.

  40. #80
    Addicted Member Crushinator's Avatar
    Join Date
    Jan 2006
    Location
    The Dark Side of the Moon, MD
    Posts
    179

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

    Great job
    Using Framework 2.0, VB.Net 2005.

Page 2 of 3 FirstFirst 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