Page 46 of 46 FirstFirst ... 3643444546
Results 1,801 to 1,827 of 1827

Thread: TwinBasic

  1. #1801
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,810

    Re: TwinBasic

    Can you develop a VB code parser? twinbasic_script.dll
    The input code can be directly parsed and run dynamically.Is to replace the VBS scripting engine


    aboutesigned to be 100% compatible with existing VB6 and VBA code, emulating all known quirks Compile to Win32 and Win64 architectures. Plans to compile for Mac, Linux, and Android. Based entirely on COM technology, such as the classic version of Visual Basic Produces a very small executable file that does not require any runtime libraries or redistributable components Currently compiles to unoptimized native code with better performance than VBA excode (VB6 p-code) Multiple components (within class/module blocks) are allowed per source file New custom VB code parser engine (written in C + +) built for flexibility and amazing performance

  2. #1802
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,103

    Re: TwinBasic

    twinBASIC status update:

    twinBASIC Update: February 11, 2024

    Highlights include the option to restore a traditional title bar to the twinBASIC IDE, a new lifetime license offer, and a lively discussion about attribute syntax.

    nolongerset.com/twinbasic-update-february-11-2024/

  3. #1803
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,103

    Re: TwinBasic

    twinBASIC status update:

    twinBASIC Update: February 18, 2024

    Highlights include progress on the IDE memory leaks, object models for automating Excel's Solver, and discussion regarding a taskbar icon monitor issue.

    nolongerset.com/twinbasic-update-february-18-2024/
    Last edited by VB6 Programming; Feb 18th, 2024 at 04:52 PM.

  4. #1804
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,103

    Re: TwinBasic

    twinBASIC status update:

    twinBASIC Update: February 25, 2024

    Highlights include reduced IDE memory consumption, two new projects from fafalone, and jpbro's clever solution to the biggest twinBASIC dev bottleneck.

    nolongerset.com/twinbasic-update-february-25-2024/

  5. #1805
    Fanatic Member Episcopal's Avatar
    Join Date
    Mar 2019
    Location
    Brazil
    Posts
    548

    Re: TwinBasic

    Sorry for my double ignorance (if I don't know, or it shouldn't exist) but is there a Friend Type or Friend Enums in TwinBasic?

  6. #1806
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,926

    Re: TwinBasic

    There is, yes. Both.

  7. #1807
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,103

    Re: TwinBasic programming

    twinBASIC status update:

    twinBASIC Update: March 3, 2024

    Highlights include rebranding the Problems panel as "Diagnostics" with expanded functionality, placeholders for the Description attribute, and tB v1 blockers.

    nolongerset.com/twinbasic-update-march-3-2024/

  8. #1808
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,103

    Re: TwinBasic programming

    twinBASIC status update:

    twinBASIC Update: March 10, 2024

    Highlights include a new Trace Mode debugging feature, improved IntelliSense performance, and details of Mike Wolfe's upcoming twinBASIC presentation at Access DevCon.

    https://nolongerset.com/twinbasic-update-march-10-2024/
    Last edited by VB6 Programming; Mar 10th, 2024 at 07:15 PM.

  9. #1809
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,103

    Re: TwinBasic programming

    twinBASIC status update:

    twinBASIC Update: March 17, 2024

    Highlights include independent TypeLibrary versioning and a detailed explanation of the new Runtime Tracing feature.


    https://nolongerset.com/twinbasic-update-march-17-2024/

  10. #1810
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,103

    Re: TwinBasic programming

    twinBASIC status update:

    twinBASIC Update: March 24, 2024

    Highlights include the return of support for twinBASIC IDE Add-ins, global search in the IDE, two new projects from fafalone, and an eye-opening twinBASIC poll.

    https://nolongerset.com/twinbasic-update-march-24-2024/

  11. #1811
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,103

    Re: TwinBasic programming

    twinBASIC status update:

    twinBASIC Update: April 1, 2024

    Highlights include dozens of bug fixes, a new MsgBox builder IDE addin, and a GitHub project for automatically setting PE image header properties.

    https://nolongerset.com/twinbasic-update-april-1-2024/

  12. #1812
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,103

    Re: TwinBasic programming

    twinBASIC status update:

    twinBASIC Update: April 7, 2024

    Highlights include the ability to embed code in tB IDE keyboard shortcuts, a consolidated page of sokinkeso's tB IDE addins, and a new App object package.

    https://nolongerset.com/twinbasic-update-april-7-2024/

  13. #1813
    New Member
    Join Date
    Dec 2023
    Posts
    14

    Re: TwinBasic

    hello fafalone,i am trying to expose the webview2.jsrun method to an activex control. just pass an paramarray to Me.WebView.JsRun method does not work when more than one parameters is passed.

    Code:
    Public Function jsRun(ByVal jsFunction As String, ParamArray args() As Variant) As Variant 'function in activex control
            ' Dim ar() As Variant, arg As Variant, subarg As Variant
            ' Dim varItemCount As Long = 0
            ' For Each arg In args
                ' If IsArray(arg) Then
                    ' For Each subarg In arg
                        ' ReDim Preserve ar(varItemCount)
                        ' ar(varItemCount) = subarg
                        ' varItemCount = varItemCount + 1
                    ' Next subarg
                ' Else
                    ' ReDim Preserve ar(varItemCount)
                    ' ar(varItemCount) = arg
                    ' varItemCount = varItemCount + 1
                ' End If
            ' Next arg
            ' Return Me.WebView.JsRun(jsFunction, ar) //1'failed
            Return Me.WebView.JsRun(jsFunction, args)'//2.directly pass paramaray.failed
            'Dim arr As Variant
            'If IsArray(args(0)) Then arr = args(0) Else arr = args '//3.tried and failed
        End Function
    
    Private Sub UserForm_Initialize() 'used in office 
    With Me.LibWebview1
    Do While Not .webviewready
        DoEvents
    Loop
    .Height = Me.Height - 1
    .Width = Me.Width - 1
    .Navigate ("https://cn.bing.com/")
     .ExecScript ("function fn(a,b){return a* 4;}")
     Debug.Print .jsRun("fn", 2) ' this is ok and get result:8
     Debug.Print .jsRun("fn", 2, 3) 'wrong and return null,affacted by the 2nd arg
     Stop
    End With
    End Sub
    Last edited by jmcilhinney; Apr 9th, 2024 at 11:44 PM.

  14. #1814
    Addicted Member
    Join Date
    Dec 2020
    Posts
    216

    Re: TwinBasic

    Quote Originally Posted by fan2006 View Post
    hello fafalone,i am trying to expose the webview2.jsrun method to an activex control. just pass an paramarray to Me.WebView.JsRun method does not work when more than one parameters is passed.

    Code:
    Public Function jsRun(ByVal jsFunction As String, ParamArray args() As Variant) As Variant 'function in activex control
            ' Dim ar() As Variant, arg As Variant, subarg As Variant
            ' Dim varItemCount As Long = 0
            ' For Each arg In args
                ' If IsArray(arg) Then
                    ' For Each subarg In arg
                        ' ReDim Preserve ar(varItemCount)
                        ' ar(varItemCount) = subarg
                        ' varItemCount = varItemCount + 1
                    ' Next subarg
                ' Else
                    ' ReDim Preserve ar(varItemCount)
                    ' ar(varItemCount) = arg
                    ' varItemCount = varItemCount + 1
                ' End If
            ' Next arg
            ' Return Me.WebView.JsRun(jsFunction, ar) //1'failed
            Return Me.WebView.JsRun(jsFunction, args)'//2.directly pass paramaray.failed
            'Dim arr As Variant
            'If IsArray(args(0)) Then arr = args(0) Else arr = args '//3.tried and failed
        End Function
    
    Private Sub UserForm_Initialize() 'used in office 
    With Me.LibWebview1
    Do While Not .webviewready
        DoEvents
    Loop
    .Height = Me.Height - 1
    .Width = Me.Width - 1
    .Navigate ("https://cn.bing.com/")
     .ExecScript ("function fn(a,b){return a* 4;}")
     Debug.Print .jsRun("fn", 2) ' this is ok and get result:8
     Debug.Print .jsRun("fn", 2, 3) 'wrong and return null,affacted by the 2nd arg
     Stop
    End With
    End Sub
    This doesn't look like the WebView control available in twinBASIC, because the method is called 'ExecuteScript' here, not 'ExecScript'. The example code you provided does work using the twinBASIC control:

    Code:
    WebViewCtl.ExecuteScript("function fn(a,b){return a* 4;}")
            MsgBox WebViewCtl.JsRun("fn", 2)
            MsgBox WebViewCtl.jsRun("fn", 2, 3)
    (two message boxes with 8 appear)

  15. #1815
    New Member
    Join Date
    Dec 2023
    Posts
    14

    Re: TwinBasic

    Quote Originally Posted by WaynePhillipsEA View Post
    This doesn't look like the WebView control available in twinBASIC, because the method is called 'ExecuteScript' here, not 'ExecScript'. The example code you provided does work using the twinBASIC control:

    Code:
    WebViewCtl.ExecuteScript("function fn(a,b){return a* 4;}")
            MsgBox WebViewCtl.JsRun("fn", 2)
            MsgBox WebViewCtl.jsRun("fn", 2, 3)
    (two message boxes with 8 appear)
    it' an acitvex writtlen in twinBASIC. i just want to get "jsrun" function work in excel vba .so i write some equivalent functions with the WebViewCtl functions? I am stuck with the problem how to pass paramarray to the WebViewCtl.jsRun which accept a paramarray parameter.

  16. #1816
    Addicted Member
    Join Date
    Dec 2020
    Posts
    216

    Re: TwinBasic

    Quote Originally Posted by fan2006 View Post
    it' an acitvex writtlen in twinBASIC. i just want to get "jsrun" function work in excel vba .so i write some equivalent functions with the WebViewCtl functions? I am stuck with the problem how to pass paramarray to the WebViewCtl.jsRun which accept a paramarray parameter.
    There's currently no built-in way to pass a ParamArray on to another procedures ParamArray arg directly, but you can do it with a slightly changed version of CallByName:

    Code:
    Private DeclareWide PtrSafe Function CallByName2 Lib "<interaction>" Alias "#9" (ByVal Object As Object, ByVal ProcName As String, ByVal CallType As VbCallType, Args() As Variant) As Variant
    Note that the Args() definition in this version of CallByName doesn't have ParamArray specified on it. You should now be able to call CallByName2(obj, "jsRun", vbMethod, paramArrayArg) which will pass the array instead of creating a new paramarray containing the array.

  17. #1817
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,926

    Re: TwinBasic

    Setting aside WebView; I don't think ParamArray can be used in the way you're trying. The values are passed on the stack; it's fixed at runtime. You can pass an array as a single argument inside a variant, but then the javascript would need to be able to handle a SAFEARRAY.

  18. #1818
    New Member
    Join Date
    Dec 2023
    Posts
    14

    Re: TwinBasic

    it worked and thx for your help.

  19. #1819
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,103

    Re: TwinBasic programming

    twinBASIC status update:

    twinBASIC Update: April 14, 2024

    Highlights include improved performance and stability, error codes for compile errors, a sneak peek at sokinkeso's External Tools plugin, and version control for twinBASIC.

    nolongerset.com/twinbasic-update-april-14-2024/

  20. #1820
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,103

    Re: TwinBasic

    twinBASIC status update:

    twinBASIC Update: April 21, 2024

    Highlights include word wrap toggling, twinBASIC returns to Vienna, a WinDevLib quick start guide, and a major milestone as twinBASIC now runs PhotoDemon!

    nolongerset.com/twinbasic-update-april-21-2024/

  21. #1821
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,103

    Re: TwinBasic programming

    twinBASIC status update:

    twinBASIC Update: April 29, 2024

    Highlights include my DevCon Vienna twinBASIC recording, massive memory reduction in the IDE, and exciting news regarding the VB6 PhotoDemon project.

    nolongerset.com/twinbasic-update-april-29-2024/

  22. #1822
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,103

    Re: TwinBasic

    Mike Wolfe's twinBASIC update presentation to the Access DevCon Vienna conference is now available on YouTube




    https://www.youtube.com/watch?v=7IfAkOOWSao

  23. #1823
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,655

    Re: TwinBasic

    Was just casually strolling through this thread and realized I left this unanswered:-
    Quote Originally Posted by Episcopal View Post
    Excuse my ignorance, but does this happen every time the program looks at the array? In advanced options, if you choose to activate the "Remove array bounds
    checks" it means that it would be faster, but less secure, is that it?
    I'd expect the answer to be yes. I don't recall ever testing what would happen if an array is read out of bounds when this option is checked but if it works the way I think it does, it will behave as it does in C which is to say the result would be undefined. It could work today, crash tomorrow and launch nuclear missiles the next day.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  24. #1824
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,103

    Re: TwinBasic

    twinBASIC status update:

    twinBASIC Update: May 6, 2024

    Highlights include support for the [NonBrowsable] attribute for ActiveX controls and discussions on Implements Via and ByVal/ByRef for tB vs. VB6 events.

    https://nolongerset.com/twinbasic-update-may-6-2024/

  25. #1825
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,103

    Re: TwinBasic programming

    twinBASIC status update:

    twinBASIC Update: May 13, 2024

    Highlights include reduced RAM usage by the compiler and an update to fafalone's Drag & Drop Demo project.


    https://nolongerset.com/twinbasic-update-may-13-2024/


    Wayne Phillips says "Whilst many of you are waiting for the MDI support, I thought I'd drop a little update in the meantime. BETA 533 offers upto 20% less RAM use by the compiler process. "
    Last edited by VB6 Programming; May 14th, 2024 at 06:54 AM.

  26. #1826
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,103

    Re: TwinBasic

    Big news from Wayne...

    MDI forms are now supported in twinBASIC

    See https://www.vbforums.com/showthread....releases/page7

    From Beta version 537 (plus Beta 538) MDI form support is added to twinBASIC.

    Sample 19 has been added to demonstrate this.

    Wayne advises "I wouldn't dive in trying to load complex MDI projects just yet until the dust settles"

  27. #1827
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,103

    Re: TwinBasic

    twinBASIC status update:

    twinBASIC Update: May 20, 2024

    Highlights include the long-awaited arrival of MDI forms, OS targeting, an animated GIF project, and the first commercially available project built with twinBASIC.

    https://nolongerset.com/twinbasic-update-may-20-2024/

Page 46 of 46 FirstFirst ... 3643444546

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