Results 1 to 40 of 959

Thread: What if there was a NEW vb6

Threaded View

  1. #11
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,454

    Re: What if there was a NEW vb6

    Quote Originally Posted by Niya View Post
    Saying that VB.Net is better is not bashing VB6.
    I can certainly do quite some things in VB6, which you will have a real hard time to replicate in .NET.
    I don't say though, that "VB6 is therefore better than VB.NET".

    On the other hand, one can certainly do (a few) things, where one needs less efforts in .NET than in VB6.
    Is it therefore "better" than VB6?
    Big fat NO - (just applying the same logic or "rule" from above).

    It's just different (with a different set of helper-libs or -classes, stuff you have to learn to accomplish things efficiently).

    Quote Originally Posted by Niya View Post
    Most people want to write apps, whether its a POS application, a file downloader, a file manager, some kind of Windows service, whatever. VB.Net can do these things a whole lot better.
    POS-applications:
    - Bread and Butter-stuff for both RAD-tools

    a "File-Downloader":
    - are you serious? (seems you never used the AsyncDownload-capabilities of a VB6-Usercontrol)

    a "file manager":
    - no clue what you mean - the umpteenths reincarnation of a "Norton-Commander-Clone" or something?

    some kind of Windows-Service
    - wrote and maintain a lot of them (for over a decade now using two drop-in *.bas modules from Sergey Merzlykin)
    ..(for those who can live with a COM-dependency, there's an OCX from MS for that)

    you can create and even consume web services very very easily.
    - can do that too - and not even touching the "dying" SOAP-protocol
    ..(recent example: authenticated JSON-based access to the Bitfinex-WebAPI, in case you watched the VB6-forum the last days)

    can rig up something to use a web service in less than a minute using VB.Net.
    - well I needed two <g> - a small Nwind-DB-SQL-Requester is now available on vbRichClient.com
    - in case you want to try it out (needs only a default-named MSHFlexGrid1 on a VB-Form, then click the Form
    Code:
    Option Explicit
    
    Private Sub Form_Click()
      On Error GoTo 1
        Set MSHFlexGrid1.DataSource = PerformNwindRequest("Select * From Customers")
    1 If Err Then MsgBox Err.Description
    End Sub
    
    Function PerformNwindRequest(SQL As String) As Object
        Dim Req As Object, B() As Byte
        Set Req = CreateObject("Winhttp.WinHttpRequest.5.1")
            Req.Open "POST", "http://vbRichClient.com/asp/ADODBTest.asp", False
            Req.SetRequestHeader "Content-Type", "application/json"
            Req.Send "{""DBName"": ""/data/NWind.mdb"", ""SQL"": """ & SQL & """}"
        B = Req.ResponseBody
        If B(0) = 123 Then Err.Raise vbObjectError, , StrConv(B, vbUnicode)
        Set PerformNwindRequest = GetRsFromByteContent(B)
    End Function
    
    Function GetRsFromByteContent(Data) As Object
       Dim Stream As Object
       Set Stream = CreateObject("ADODB.Stream")
           Stream.Type = 1 '<- 1 = adTypeBinary
           Stream.Open
           Stream.Write Data
           Stream.Position = 0
       Set GetRsFromByteContent = CreateObject("ADODB.Recordset")
           GetRsFromByteContent.Open Stream
    End Function
    Console applications
    possible (there's classes for it, but please bring an example, what you use this for)

    Powershell applications
    - not sure what you mean with a "PowerShell-Application" (perhaps .NET-code, triggered by it)
    - but it's equally easy to run (native compiled) VB6-code from the Powershell-Prompt

    VB.Net can even write games:-
    - sure - and here I thought it's developers who write them...
    - and no, especially in that area, there's always "frameworks you work with"
    - for VB6 that would be e.g. DirectX-9 on current systems for 3D-stuff (or e.g. vbRichClient+PhysicsEngine for 2D-stuff)

    It's really tiring what you do here, but I thought a short "busting of all the wrong claims you made" was needed.

    Since you seem so fond of games, maybe try a really tiny example
    (only about 150 lines of code in total, across 3 classes, a module and a form, clear code)
    http://www.vbforums.com/showthread.p...or-Starters%29

    Try re-implement that in .NET (I mean, it's really just a small Demo, not a full game),
    then come back and show us your .NET result.

    In case you have a small example too (100-200 lines of code total), I'd try my best to
    present you with a VB6-solution in return.

    Fair enough?

    Olaf
    Last edited by Schmidt; Apr 29th, 2015 at 06:32 PM. Reason: Added Err-Handler for Webservice-Request

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