|
-
Dec 15th, 2023, 08:22 AM
#1761
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:
-
Dec 15th, 2023, 06:37 PM
#1762
Junior Member
Re: TwinBasic
got it and thx for you help. i have been stuck with this problem for a long time.
-
Dec 16th, 2023, 01:16 AM
#1763
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.
-
Dec 16th, 2023, 09:41 PM
#1764
Junior Member
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.
-
Dec 17th, 2023, 05:32 AM
#1765
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.
-
Dec 17th, 2023, 08:18 PM
#1766
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.
-
Dec 17th, 2023, 09:07 PM
#1767
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/
-
Dec 17th, 2023, 10:14 PM
#1768
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>
-
Dec 18th, 2023, 12:47 AM
#1769
Re: TwinBasic
Is just saving the new version not working?
-
Dec 24th, 2023, 07:18 PM
#1770
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/
-
Dec 26th, 2023, 12:34 AM
#1771
Junior Member
Re: TwinBasic
time flies and it has been a long time since release 423.really look forward to the new release.
-
Dec 29th, 2023, 10:45 PM
#1772
Junior Member
Re: TwinBasic
hello,fafalone. in tb console app the keyword "App" does not work .is there any method to get the consoleApp's path ?
-
Dec 30th, 2023, 12:12 AM
#1773
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
-
Dec 30th, 2023, 02:10 AM
#1774
Junior Member
Re: TwinBasic
Api solution seems simple and clean.thx.
-
Jan 1st, 2024, 07:34 AM
#1775
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/
-
Jan 3rd, 2024, 02:10 PM
#1776
New Member
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
-
Jan 3rd, 2024, 04:14 PM
#1777
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
-
Jan 4th, 2024, 01:23 AM
#1778
Re: TwinBasic
 Originally Posted by cheweidian
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.
-
Jan 4th, 2024, 05:56 AM
#1779
New Member
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.
-
Jan 4th, 2024, 06:44 AM
#1780
Re: TwinBasic
Wayne has teased us with a screenshot of the latest twinBASIC IDE
-
Jan 5th, 2024, 02:23 AM
#1781
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.
-
Jan 7th, 2024, 03:37 PM
#1782
Re: TwinBasic
No twinBASIC status update today.
Instead here is: Archive Collection: DevCon 2023
https://nolongerset.com/archive-devcon-2023/
-
Jan 13th, 2024, 08:15 PM
#1783
Re: TwinBasic Forum
Last edited by VB6 Programming; Jan 14th, 2024 at 09:00 AM.
-
Jan 15th, 2024, 05:05 AM
#1784
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/
-
Jan 19th, 2024, 05:10 AM
#1785
New Member
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?
-
Jan 19th, 2024, 11:28 PM
#1786
Re: TwinBasic
 Originally Posted by Iraqilwaina
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.
-
Jan 21st, 2024, 06:25 PM
#1787
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/
-
Jan 24th, 2024, 07:18 PM
#1788
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.
-
Jan 24th, 2024, 07:41 PM
#1789
Re: TwinBasic
 Originally Posted by Iraqilwaina
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.
-
Jan 26th, 2024, 06:19 AM
#1790
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.
-
Jan 26th, 2024, 11:10 AM
#1791
Last edited by VB6 Programming; Jan 30th, 2024 at 10:39 AM.
Reason: Updated
-
Jan 28th, 2024, 09:10 AM
#1792
Re: TwinBasic
Buy Wayne a coffee to help support all his work on twinBASIC...
https://ko-fi.com/twinbasic
-
Jan 28th, 2024, 03:58 PM
#1793
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/
-
Jan 28th, 2024, 04:53 PM
#1794
Re: TwinBasic
 Originally Posted by VB6 Programming
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
 
-
Feb 5th, 2024, 12:56 AM
#1795
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.
-
Feb 5th, 2024, 01:19 AM
#1796
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).
-
Feb 5th, 2024, 03:31 AM
#1797
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.
-
Feb 5th, 2024, 04:36 AM
#1798
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
Last edited by jdelano; Feb 5th, 2024 at 04:41 AM.
-
Feb 5th, 2024, 05:46 AM
#1799
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/
-
Feb 5th, 2024, 08:43 PM
#1800
Re: TwinBasic
 Originally Posted by dee-u
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:
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|