Page 45 of 52 FirstFirst ... 3542434445464748 ... LastLast
Results 1,761 to 1,800 of 2075

Thread: TwinBasic

  1. #1761
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,654

    Re: TwinBasic

    You can browse the source through the project explorer in the top left, under Packages:




    The 'Fmt' is the Library Symbol which you see listed next to the full name in the references settings where you added it:


  2. #1762
    Junior Member
    Join Date
    Dec 2023
    Posts
    30

    Re: TwinBasic

    got it and thx for you help. i have been stuck with this problem for a long time.

  3. #1763
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,654

    Re: TwinBasic

    You're welcome. Any other questions, don't be afraid to ask.

    For language issues remember-- tB is backwards compatible with VB6, so code to do something in that should work in tB.

    You can also find a lot of tB-specific information on the project's GitHub Wiki, and the main repository or language design repository, both under Issues and Discussions.

  4. #1764
    Junior Member
    Join Date
    Dec 2023
    Posts
    30

    Re: TwinBasic

    I have no further comment on language design.here just my suggestions about tb as a user.multline strings and formatted strings(using variables in strings) are both used in other languages.i think it's necessary to bring them into tb.Addtionally ,vb array is too limited.js array is a good example for ease of use tb could learn from.

  5. #1765
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,654

    Re: TwinBasic

    You can already have multiline strings...

    Code:
    Dim s As String = "Line 1" & vbCrLf & _
    "Line 2" & vbCrLf & _
    "Line 3 & vbCrLf & _
    ...
    and you can have variables in a string...

    Code:
    Dim x As Long = 1
    Dim s As String = "x = " & x
    Or Replace() to replace variables with their contents; Format$() tp apply certain formatting options (or LCase, UCase, Left, Right, Mid...)...

    There is a proposal to make multiline easier, without the line continuation chars.

    Not sure if you mean something different?


    tB recently got some new array functionality over VB6:

    This feature allows you to assign the contents of an array to multiple variables in a single line:
    Code:
        Dim a As Long, b As Long, c As Long
        Dim d(2) As Long
        d(0) = 1
        d(1) = 2
        d(2) = 3
        Array(a, b, c) = d
        Debug.Print a, b, c
    This would print 1 2 3. You could also assign multiple variables at once like this and get the same result:
    Code:
        Dim a As Long, b As Long, c As Long
        Array(a, b, c) = Array(1, 2, 3)
        Debug.Print a, b, c
    Last edited by fafalone; Dec 17th, 2023 at 05:36 AM.

  6. #1766
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: TwinBasic

    If you download the VB6 decompiler, you can see almost 100% of the source code It's just a variable, and the name is random. If you use the database password in the source code or the registration code that the software needs to log in and register, you can see it all. So for now, VB6 is not safe. The main problem with not learning VB. Net for so many years is that 100% of its source code can be decompiled.

    There is no Chinese version of twinbasic at present. I hope it can be provided.
    When compiling or opening the project, twinbasic is still very slow, but many of its functions are very advanced and can solve 80% of our problems.
    One way I say it is. I have 500 modules in a folder. There are also 100 control CTL files, and I often have to develop a lot of gadgets.

    I want these shared modules to be placed in a folder so that different projects can reference them directly without copying them to a new project directory.
    What I don't like most is that it's all merged into a separate project file.

    I hope that a window can be added directly in the IDE, and you can post by clicking it.Receive a forum to see all the stickers you send, so you can do everything directly in an idE.

  7. #1767
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,802

    Re: TwinBasic

    twinBASIC status update:

    twinBASIC Update: December 17, 2023

    Highlights include a new twinBASIC project to allow easy input filtering of text boxes and the renaming of the tbShellLib project to reflect its expanded scope.

    nolongerset.com/twinbasic-update-december-17-2023/

  8. #1768
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: TwinBasic

    how to make change language package?

    Code:
    <div id="rootMenu1Inner">
    					<div class="menuItem" id="rootMenuFile">文件</div>
    					<div class="menuItem" id="rootMenuEdit">编辑</div>
    					<div class="menuItem" id="rootMenuView">视图</div>
    					<div class="menuItem" id="rootMenuProject">Project</div>
    					<div class="menuItem" id="rootMenuFormat">Format</div>
    					<div class="menuItem" id="rootMenuDebug">Debug</div>
    					<div class="menuItem" id="rootMenuRun">Run</div>
    					<div class="menuItem" id="rootMenuTools">工具</div>
    					<div class="menuItem" id="rootMenuAddins">Add-Ins</div>
    					<div class="menuItem" id="rootMenuWindows">Window</div>
    					<div class="menuItem" id="rootMenuHelp">帮助</div>
    
    	<div class="icon playIconBlue" id="playIcon" title="Start / Continue (F5)"></div>
    									<div class="icon iconType2" id="pauseIcon" title="Break Into Code (Ctrl+Break)"></div>
    									<div class="icon stopIconRed" id="stopIcon" title="Stop"></div>
    									<div class="icon iconType2" id="debugStepOverIcon" title="Step Over (F10 or legacy Shift+F8)"></div>
    									<div class="icon iconType2" id="debugStepIntoIcon" title="Step Into (F11 or legacy F8)"></div>
    									<div class="icon iconType2" id="debugStepOutIcon" title="Step Out (Shift+F11 or legacy Ctrl+Shift+F8)"></div>
    									<div class="icon iconType2" id="runOrPreviewIcon" title="Run the code at the cursor position / Preview the form (F6)"></div>

  9. #1769
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,654

    Re: TwinBasic

    Is just saving the new version not working?

  10. #1770
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,802

    Re: TwinBasic

    twinBASIC status update:

    twinBASIC Update: December 24, 2023

    Highlights include an updated twinBASIC roadmap, a sneak peek at upcoming IDE menu and docking improvements, and RadioMan - a new tB project from fafalone.

    nolongerset.com/twinbasic-update-december-24-2023/

  11. #1771
    Junior Member
    Join Date
    Dec 2023
    Posts
    30

    Re: TwinBasic

    time flies and it has been a long time since release 423.really look forward to the new release.

  12. #1772
    Junior Member
    Join Date
    Dec 2023
    Posts
    30

    Re: TwinBasic

    hello,fafalone. in tb console app the keyword "App" does not work .is there any method to get the consoleApp's path ?

  13. #1773
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,654

    Re: TwinBasic

    In the Settings for the project, go to the 'Library References' section, and under Available Packages, add the 'VB Compatibility Package'

    It's not enabled by default since it's mostly just the Forms and controls, but as long as you don't try to actually add a form it should be fine to use it for the app object.

    There's a Windows API solution too, if you're never going to be worried about cross-platform, but it won't use the last compile path when running from the IDE:

    Code:
        Public DeclareWide PtrSafe Function GetModuleFileName Lib "kernel32" Alias "GetModuleFileNameW" (ByVal hModule As LongPtr, ByVal lpFileName As String, ByVal nSize As Long) As Long
        
        Public Sub Main()
        
            Dim sPath As String, cch As Long
            sPath = String$(260, 0)
            cch = GetModuleFileName(0, sPath, 260)
            If cch Then
                sPath = Left$(sPath, cch)
                sPath = Left$(sPath, InStrRev(sPath, "\")) 'Remove filename.exe
            Else
                sPath = "" 'Error
            End If

  14. #1774
    Junior Member
    Join Date
    Dec 2023
    Posts
    30

    Re: TwinBasic

    Api solution seems simple and clean.thx.

  15. #1775
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,802

    Re: TwinBasic

    twinBASIC status update:

    twinBASIC Update: December 31, 2023

    A quiet week of development with a fascinating conversation on Wayne's decision to write a custom compiler rather than transpile twinBASIC into C/C++.

    nolongerset.com/twinbasic-update-december-31-2023/

  16. #1776
    New Member
    Join Date
    Jan 2024
    Posts
    5

    Re: TwinBasic

    I created a standard dll, put it in the twinbasic project folder and declared the dll in the code, but nothing happens.Prompt unable to load DLL,Even if the DLL is located in the project folder, the program still needs the full path,There is no problem in VB6, but the full path needs to be declared in TB,I don't know what the problem is

  17. #1777
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,654

    Re: TwinBasic

    Yeah there's some issues with that right now.

    Putting [ SetDllDirectory(True) ] before the first-called API declare usually works (on the line before Public Declare...), if not then in the startup routine before calling anything,

    Private DeclareWide PtrSafe Function SetDllDirectory Lib "kernel32" Alias "SetDllDirectoryW" (Optional ByVal lpPathName As String) As Long

    SetDllDirectory App.Path

  18. #1778
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: TwinBasic

    Quote Originally Posted by cheweidian View Post
    I created a standard dll, put it in the twinbasic project folder and declared the dll in the code, but nothing happens.Prompt unable to load DLL,Even if the DLL is located in the project folder, the program still needs the full path,There is no problem in VB6, but the full path needs to be declared in TB,I don't know what the problem is
    Because of VB6's declaration of these DLL APIs, VB6 internally has a special loading tool, dllcallfunction. Automatically detect whether there is a DLL in the current directory or system directory

    It is possible that twinbasic will only check system directories.So when the program starts to run, it is better to locate the DLL directory to the folder where the current software is located.
    If your DLL is not put here, and put in the system directory, I do not know if it can be found.

  19. #1779
    New Member
    Join Date
    Jan 2024
    Posts
    5

    Re: TwinBasic

    Thank you for Fafalone's specific code example. I have successfully applied it to solve my problem. I also want to thank Xiao Yao for providing ideas, which have greatly helped me understand this issue. If the DLL is placed in the system directory, tb can find it. By default, there may be some issues with the tb check project folder. Tb may only check the system directory.

  20. #1780
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,802

    Re: TwinBasic

    Wayne has teased us with a screenshot of the latest twinBASIC IDE

    Name:  tbNewLook10.jpg
Views: 2223
Size:  18.6 KB

  21. #1781
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: TwinBasic

    Unlike explicit loading, the DLL is automatically called when the application starts running, and the system searches the dynamic library from the following path by default (MSDN description): 1. The directory containing the EXE file, 2. The current working directory of the process, 3. Windows system directory, 4. Windows directory, 5. A list of directories listed in the Path environment variable

    Use SetDllDirectory, AddDllDirectory, and SetDefaultDllDirectories in kernel32.dll SetDll Directory is used to specify the set system search path AddDllDirectory is used to submit all the paths of the system defined by the user The key is SetDefaultDll Directories, which is used to specify the type of all required paths. Fill in here.

  22. #1782
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,802

    Re: TwinBasic

    No twinBASIC status update today.

    Instead here is: Archive Collection: DevCon 2023
    https://nolongerset.com/archive-devcon-2023/

    with twinBASIC Update: DevCon 2023
    https://nolongerset.com/devcon-2023-tb/

  23. #1783
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,802

    Smile Re: TwinBasic Forum

    twinBASIC now has its own forum on VBForums

    www.vbforums.com/forumdisplay.php?108-TwinBASIC
    Last edited by VB6 Programming; Jan 14th, 2024 at 09:00 AM.

  24. #1784
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,802

    Re: TwinBasic

    twinBASIC status update:

    twinBASIC Update: January 14, 2024

    Highlights include a dedicated twinBASIC forum at VBForums, new teaser images from this Friday's upcoming beta release, and several projects from fafalone.

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

  25. #1785

    Re: TwinBasic

    Have you considered how TwinBasic will handle cross-platform compilation, especially regarding graphics, given that VB6 relies heavily on Windows-specific APIs like GDI, and what are your thoughts on the proposed "cross" mode, limiting features to those compatible with all platforms?

  26. #1786
    Fanatic Member Episcopal's Avatar
    Join Date
    Mar 2019
    Location
    Brazil
    Posts
    617

    Re: TwinBasic

    Quote Originally Posted by Iraqilwaina View Post
    Have you considered how TwinBasic will handle cross-platform compilation, especially regarding graphics, given that VB6 relies heavily on Windows-specific APIs like GDI, and what are your thoughts on the proposed "cross" mode, limiting features to those compatible with all platforms?
    I'm not an expert in the area, but there should be some kind of native library common to all platforms, nothing that the community can solve. Just an idea.

  27. #1787
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,802

    Re: TwinBasic

    twinBASIC status update:

    twinBASIC Update: January 21, 2024

    Highlights include a minor delay of the long-awaited twinBASIC IDE update, a new twinBASIC FAQ page, and several new and updated tB projects from fafalone.

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

  28. #1788
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: TwinBasic

    After 20 years of.net not supporting the creation of OCX, Microsoft is still too unreliable to trust the company. It would be perfect if twinbasic could write C # VB. Net that code. The net compiler comes with the system and is supported across platforms. If you can directly compile the corresponding file (*.cs.vb) into a DLL, TLB file, twinbasic, which can be directly referenced, you can also turn the control created by.net into a twinbasic control and compile it into OCX for VB6 to use.

  29. #1789
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: TwinBasic

    Quote Originally Posted by Iraqilwaina View Post
    Have you considered how TwinBasic will handle cross-platform compilation, especially regarding graphics, given that VB6 relies heavily on Windows-specific APIs like GDI, and what are your thoughts on the proposed "cross" mode, limiting features to those compatible with all platforms?
    .net core winform(Someone wrote a simpler version of the same interface themselves.)Someone wrote a simpler version of the same interface themselves. So that it can be used across platforms.
    cairo ui controls,by rc6.dll
    (button,listbox,textbox......)
    web ui(input,text area,)
    gtk controls
    ?These can be implemented and invoked across platforms.

  30. #1790
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,802

    Re: TwinBasic

    The long awaited new release of twinBASIC is now available.

    See www.vbforums.com/showthread.php?902460-New-release-of-the-twinBASIC-programming-IDE

    Note: This is a PREVIEW of the significant changes made over the last two months. Regressions are EXPECTED at this stage.

  31. #1791
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,802

    Re: TwinBasic

    Releases 427, 428, 429, 430, 431 and 432 of twinBASIC are now available...

    www.vbforums.com/showthread.php?900178-twinBASIC-programming-Beta-releases

    github.com/twinbasic/twinbasic/releases
    Last edited by VB6 Programming; Jan 30th, 2024 at 10:39 AM. Reason: Updated

  32. #1792
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,802

    Re: TwinBasic

    Buy Wayne a coffee to help support all his work on twinBASIC...

    https://ko-fi.com/twinbasic

  33. #1793
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,802

    Re: TwinBasic

    twinBASIC status update:

    twinBASIC Update: January 28, 2024

    Highlights include ... ah, never mind. The new twinBASIC IDE is here!!!! Plus: static linking, experimental type inference, 20-30% reductions in exe sizes, and more!

    nolongerset.com/twinbasic-update-january-28-2024/

  34. #1794
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    Re: TwinBasic

    Quote Originally Posted by VB6 Programming View Post
    Buy Wayne a coffee to help support all his work on twinBASIC...

    https://ko-fi.com/twinbasic
    With the amount that guy has done in the time he's done it, he's either already over-caffeinated, or something...
    My usual boring signature: Nothing

  35. #1795
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: TwinBasic

    Does TB support interacting with 64bit Office? If I am limited to using the 64 bit version of the Database Access Engine, will using TB allow me to use the following provider?

    Code:
    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Employees.accdb;Persist Security Info=False;
    I did a quick 'import' of my little project but encountered 'Run-time error 3706 (00000E7A) Application-defined or object-defined error' when opening the recordset using the above connectionstring.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  36. #1796
    Hyperactive Member
    Join Date
    Dec 2020
    Posts
    314

    Re: TwinBasic

    Yes, it should work. You'll need to ensure that you haven't got a reference to DAO in your project references, and instead reference "Microsoft Office X.0 Access database engine" (where X is the Office version number you have installed).

  37. #1797
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: TwinBasic

    I think I may not have described the problem clearly. I have a Microsoft Access database (.accdb) and I need to install the 32bit Access Database Engine to be able to access the database. But since I have a 64-bit Microsoft Office then I cannot install the 32bit Access Database Engine. With TB, can I instead use the 64bit Access Database engine? The engine is being called by the ADO, it is not something that I reference in VB6.
    Attachment 190353
    I am just wondering if I can find a workaround using TB. My other option is just to export the Access database to MySQL and connect to that MySQL.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  38. #1798
    Fanatic Member
    Join Date
    Jul 2022
    Location
    Buford, Ga USA
    Posts
    630

    Re: TwinBasic

    I have an Access 2000 database that I opened in twinBASIC and ran a query using this code:

    Code:
        Private Sub Command1_Click()
            Dim cn As New ADODB.Connection
            Dim strCon As String
            Dim rs As ADODB.Recordset
            Dim SQL As String
            
            strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\cp-pms.mdb;"
            
            cn.Open strCon
            SQL = "Select * from [Project Header]"
            
            Set rs = New ADODB.Recordset
            rs.ActiveConnection = cn
            rs.CursorLocation = adUseClient
            rs.Open SQL
            
            MsgBox("Project Name: " & rs(1))
            
            rs.Close()
            Set rs = Nothing
            
            cn.Close
            Set cn = Nothing
            
        End Sub
    I used this code to check the version to be sure

    Code:
        Private Sub Command2_Click()
            Dim objAccess As New Access.Application
            Dim intFormat As Integer
            
            objAccess.OpenCurrentDatabase "F:\cp-pms.mdb"
            intFormat = objAccess.CurrentProject.FileFormat
            
            Select Case intFormat
                Case 2
                    MsgBox("Microsoft Access 2")
                Case 7
                    MsgBox("Microsoft Access 95")
                Case 8
                    MsgBox("Microsoft Access 97")
                Case 9
                    MsgBox("Microsoft Access 2000")
                Case 10
                    MsgBox("Microsoft Access 2003")
            End Select
            
            objAccess.Quit()
            Set objAccess = Nothing
            
        End Sub
    edit: added screenshot of reading db (showing the DB opened in Access 2007 in my XP VM as the background) twinBASIC v434, is running in Windows 11 Pro
    Attached Images Attached Images    
    Last edited by jdelano; Feb 5th, 2024 at 04:41 AM.

  39. #1799
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,802

    Re: TwinBasic

    twinBASIC status update:

    twinBASIC Update: February 4, 2024

    Highlights include two newly commissioned features (BigNumber support and a web page IDE panel) and a tB IDE comment/uncomment add-in.

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

  40. #1800
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,654

    Re: TwinBasic

    Quote Originally Posted by dee-u View Post
    I think I may not have described the problem clearly. I have a Microsoft Access database (.accdb) and I need to install the 32bit Access Database Engine to be able to access the database. But since I have a 64-bit Microsoft Office then I cannot install the 32bit Access Database Engine. With TB, can I instead use the 64bit Access Database engine? The engine is being called by the ADO, it is not something that I reference in VB6.
    Attachment 190353
    I am just wondering if I can find a workaround using TB. My other option is just to export the Access database to MySQL and connect to that MySQL.
    Yes, you can use the 64bit engine from twinBASIC. You need to have the compiler in 64bit mode obviously, with all the caveats that apply to VBA 64bit with LongPtr/PtrSafe.

    I have 64bit Office installed as well, you can see in twinBASIC I have the reference available to use:

    Name:  tbdb.jpg
Views: 1569
Size:  38.9 KB

Page 45 of 52 FirstFirst ... 3542434445464748 ... 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