Thanks,will have a try.Xusinboy Bekchanov wrote: ↑Apr 06, 2025 1:54Hello, I found a solution to this problem. When copying the compiler from this link https://users.freebasic-portal.de/stw/builds/win64/ and copying lib files do not overwrite existing lib files then the IDE works without problems. And I wrote about it in this topic too: viewtopic.php?p=306944#p306944PeterHu wrote: ↑Apr 01, 2025 8:42Thanks.Xusinboy Bekchanov wrote: ↑Mar 30, 2025 8:09
I left a message about this error here:
viewtopic.php?p=306858#p306858
VisualFBEditor - IDE for FreeBasic
Re: VisualFBEditor - IDE for FreeBasic
Re: VisualFBEditor - IDE for FreeBasic
Is there a limit for the amount of entries for "Build Configurations"?
VisualFBEditor64.ini
Only 0 - 6 will be displayed in combo and in Option -> Build Configurations -> only 7 are listed.


I'm using the x64 version only.
VisualFBEditor64.ini
Code: Select all
[BuildConfigurations]
DefaultBuildConfiguration=
Name_0=-gen gcc -Wc -Ofast
Switches_0=-gen gcc -Wc -Ofast
Name_1=-gen gcc -Wc -Ofast+
Switches_1=-gen gcc -Wc -Ofast,-march=native,-funroll-loops,-mfpmath=sse
Name_2=-gen gcc -Wc -Os
Switches_2=-gen gcc -Wc -Os
Name_3=DLL
Switches_3=-dll -export
Name_4=DLL -gen gcc -Wc -Ofast
Switches_4=-dll -export -gen gcc -Wc -Ofast
Name_5=DLL IMAGE_FILE_LARGE_ADDRESS_AWARE (x86)
Switches_5=-dll -export -Wl --large-address-aware
Name_6=DLL -gen gcc -Wc -Ofast+
Switches_6=-dll -export -gen gcc -Wc -Ofast -Wc -march=native -Wc -funroll-loops -Wc -mfpmath=sse
Name_7=Debug
Switches_7=-g -exx
Name_8=Debug DLL
Switches_8=-dll export -g -exx


I'm using the x64 version only.
-
- Posts: 877
- Joined: Jul 26, 2018 18:28
Re: VisualFBEditor - IDE for FreeBasic
Fixed: Build Configurations count:UEZ wrote: ↑Apr 15, 2025 20:58 Is there a limit for the amount of entries for "Build Configurations"?
VisualFBEditor64.iniOnly 0 - 6 will be displayed in combo and in Option -> Build Configurations -> only 7 are listed.Code: Select all
[BuildConfigurations] DefaultBuildConfiguration= Name_0=-gen gcc -Wc -Ofast Switches_0=-gen gcc -Wc -Ofast Name_1=-gen gcc -Wc -Ofast+ Switches_1=-gen gcc -Wc -Ofast,-march=native,-funroll-loops,-mfpmath=sse Name_2=-gen gcc -Wc -Os Switches_2=-gen gcc -Wc -Os Name_3=DLL Switches_3=-dll -export Name_4=DLL -gen gcc -Wc -Ofast Switches_4=-dll -export -gen gcc -Wc -Ofast Name_5=DLL IMAGE_FILE_LARGE_ADDRESS_AWARE (x86) Switches_5=-dll -export -Wl --large-address-aware Name_6=DLL -gen gcc -Wc -Ofast+ Switches_6=-dll -export -gen gcc -Wc -Ofast -Wc -march=native -Wc -funroll-loops -Wc -mfpmath=sse Name_7=Debug Switches_7=-g -exx Name_8=Debug DLL Switches_8=-dll export -g -exx
I'm using the x64 version only.
https://github.com/XusinboyBekchanov/Vi ... c37d76b593
Thanks.
Re: VisualFBEditor - IDE for FreeBasic
Downloaded the latest GitHub files but too many errors during compilation:
Code: Select all
C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src>"c:\_BZ25LN\Programme\Coding\FreeBASIC64\fbc.exe" "VisualF
BEditor.bas" -s gui -x "../VisualFBEditor64.exe" "VisualFBEditor.rc" -i "..\Controls\MyFbFramework" -v -gen gcc -Wc -Os
FreeBASIC Compiler - Version 1.10.1 (2023-12-24), built for win64 (64bit)
Copyright (C) 2004-2023 The FreeBASIC development team.
standalone
target: win64, x86-64, 64bit
backend: gcc
compiling: VisualFBEditor.bas -o VisualFBEditor.c (main module)
C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\EditControl.bas(1873) error 24: Invalid data types
C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\EditControl.bas(3737) error 42: Variable not declared, FHo
verTime
C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\EditControl.bas(3737) error 3: Expected End-of-Line, found
'FHoverTime'
C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\EditControl.bas(7651) error 3: Expected End-of-Line, found
'='
C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\TabWindow.bas(13415) error 42: Variable not declared, ToHe
xStrUnicode
C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\TabWindow.bas(13421) error 1: Argument count mismatch, fou
nd 'ToHexStrUnicode'
C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\TabWindow.bas(13427) error 9: Expected expression, found '
ToHexStrUnicode'
C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\TabWindow.bas(13437) error 1: Argument count mismatch, found 'ToHexStrUnicode'
C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\TabWindow.bas(13472) error 42: Variable not declared, From
HexStrUnicode
C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\TabWindow.bas(13478) error 1: Argument count mismatch, fou
nd 'FromHexStrUnicode' C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\TabWindow.bas(13478) error 133: Too many errors, exiting
C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src>cd ..\
C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor>
-
- Posts: 877
- Joined: Jul 26, 2018 18:28
Re: VisualFBEditor - IDE for FreeBasic
You have not downloaded the latest version of MyFbFramework.UEZ wrote: ↑Apr 16, 2025 10:06 Downloaded the latest GitHub files but too many errors during compilation:Code: Select all
C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src>"c:\_BZ25LN\Programme\Coding\FreeBASIC64\fbc.exe" "VisualF BEditor.bas" -s gui -x "../VisualFBEditor64.exe" "VisualFBEditor.rc" -i "..\Controls\MyFbFramework" -v -gen gcc -Wc -Os FreeBASIC Compiler - Version 1.10.1 (2023-12-24), built for win64 (64bit) Copyright (C) 2004-2023 The FreeBASIC development team. standalone target: win64, x86-64, 64bit backend: gcc compiling: VisualFBEditor.bas -o VisualFBEditor.c (main module) C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\EditControl.bas(1873) error 24: Invalid data types C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\EditControl.bas(3737) error 42: Variable not declared, FHo verTime C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\EditControl.bas(3737) error 3: Expected End-of-Line, found 'FHoverTime' C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\EditControl.bas(7651) error 3: Expected End-of-Line, found '=' C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\TabWindow.bas(13415) error 42: Variable not declared, ToHe xStrUnicode C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\TabWindow.bas(13421) error 1: Argument count mismatch, fou nd 'ToHexStrUnicode' C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\TabWindow.bas(13427) error 9: Expected expression, found ' ToHexStrUnicode' C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\TabWindow.bas(13437) error 1: Argument count mismatch, found 'ToHexStrUnicode' C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\TabWindow.bas(13472) error 42: Variable not declared, From HexStrUnicode C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\TabWindow.bas(13478) error 1: Argument count mismatch, fou nd 'FromHexStrUnicode' C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src\TabWindow.bas(13478) error 133: Too many errors, exiting C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor\src>cd ..\ C:\_BZ25LN\Programme\Coding\FreeBASIC_IDEs\VisualFBEditor>
Re: VisualFBEditor - IDE for FreeBasic
Doh - forgot to download also the framework. Compilation worked properly again.
Seems to work properly now - thanks.
Seems to work properly now - thanks.
Re: VisualFBEditor - IDE for FreeBasic
Is it possible to display the color values in Options -> Code Editor -> Colors and Fonts in hex format?
With hex values you can see directly the rgb channel values.
When you choose e.g. yellow the text color is white and not really visible. Same with black.
Maybe you can use this code for proper text color.
With hex values you can see directly the rgb channel values.
When you choose e.g. yellow the text color is white and not really visible. Same with black.
Maybe you can use this code for proper text color.
Code: Select all
Function LinearizeColorComponent(c As Double) As Double
If c <= 0.03928 Then Return c / 12.92
Return ((c + 0.055) / 1.055) ^ 2.4
End Function
Function GetLuminance(r As UByte, g As UByte, b As UByte) As Double
Dim As Double fr = r / 255
Dim As Double fg = g / 255
Dim As Double fb = b / 255
fr = LinearizeColorComponent(fr)
fg = LinearizeColorComponent(fg)
fb = LinearizeColorComponent(fb)
Return 0.2126 * fr + 0.7152 * fg + 0.0722 * fb
End Function
Function GetReadableTextColor(bgColor As ULong) As ULong 'RGB format
Dim As UByte r = (bgColor Shr 16) And &hFF
Dim As UByte g = (bgColor Shr 8) And &hFF
Dim As UByte b = bgColor And &hFF
Dim As Double lum = GetLuminance(r, g, b)
Dim As Double contrastWhite = (1.0 + 0.05) / (lum + 0.05)
Dim As Double contrastBlack = (lum + 0.05) / (0.0 + 0.05)
If contrastWhite > contrastBlack Then Return &hFFFFFF
Return 0
End Function
Dim bgColor As ULong = &hFFFF00
Dim textColor As ULong = GetReadableTextColor(bgColor)
Print "Background color &h"; Hex(bgColor, 6); ". Text color &h"; Hex(textColor)
Sleep
-
- Posts: 877
- Joined: Jul 26, 2018 18:28
Re: VisualFBEditor - IDE for FreeBasic
Improved: Displaying the color values in Options in hex format:UEZ wrote: ↑Apr 18, 2025 11:04 Is it possible to display the color values in Options -> Code Editor -> Colors and Fonts in hex format?
With hex values you can see directly the rgb channel values.
When you choose e.g. yellow the text color is white and not really visible. Same with black.
Maybe you can use this code for proper text color.Code: Select all
Function LinearizeColorComponent(c As Double) As Double If c <= 0.03928 Then Return c / 12.92 Return ((c + 0.055) / 1.055) ^ 2.4 End Function Function GetLuminance(r As UByte, g As UByte, b As UByte) As Double Dim As Double fr = r / 255 Dim As Double fg = g / 255 Dim As Double fb = b / 255 fr = LinearizeColorComponent(fr) fg = LinearizeColorComponent(fg) fb = LinearizeColorComponent(fb) Return 0.2126 * fr + 0.7152 * fg + 0.0722 * fb End Function Function GetReadableTextColor(bgColor As ULong) As ULong 'RGB format Dim As UByte r = (bgColor Shr 16) And &hFF Dim As UByte g = (bgColor Shr 8) And &hFF Dim As UByte b = bgColor And &hFF Dim As Double lum = GetLuminance(r, g, b) Dim As Double contrastWhite = (1.0 + 0.05) / (lum + 0.05) Dim As Double contrastBlack = (lum + 0.05) / (0.0 + 0.05) If contrastWhite > contrastBlack Then Return &hFFFFFF Return 0 End Function Dim bgColor As ULong = &hFFFF00 Dim textColor As ULong = GetReadableTextColor(bgColor) Print "Background color &h"; Hex(bgColor, 6); ". Text color &h"; Hex(textColor) Sleep
https://github.com/XusinboyBekchanov/Vi ... 7774d2f02d
Thanks.
Re: VisualFBEditor - IDE for FreeBasic
Thanks for the quick implementation.
Can you add Hex(color, 6) to have a static color (BGR) view with same length please?
If values are BGR, what I think, then
Can you add Hex(color, 6) to have a static color (BGR) view with same length please?
If values are BGR, what I think, then
Code: Select all
Function GetReadableTextColor(bgColor As Integer) As ULong 'BGR format
Dim As ULong bgColorNew = Max(0, bgColor)
Dim As UByte b = (bgColorNew Shr 16) And &hFF
Dim As UByte g = (bgColorNew Shr 8) And &hFF
Dim As UByte r = bgColorNew And &hFF
Dim As Double lum = GetLuminance(r, g, b)
Dim As Double contrastWhite = (1.0 + 0.05) / (lum + 0.05)
Dim As Double contrastBlack = (lum + 0.05) / (0.0 + 0.05)
If contrastWhite > contrastBlack Then Return &hFFFFFF
Return 0
End Function
-
- Posts: 877
- Joined: Jul 26, 2018 18:28
Re: VisualFBEditor - IDE for FreeBasic
Fixed: Displaying the color values in Options in hex format:UEZ wrote: ↑Apr 18, 2025 19:19 Thanks for the quick implementation.
Can you add Hex(color, 6) to have a static color (BGR) view with same length please?
If values are BGR, what I think, thenCode: Select all
Function GetReadableTextColor(bgColor As Integer) As ULong 'BGR format Dim As ULong bgColorNew = Max(0, bgColor) Dim As UByte b = (bgColorNew Shr 16) And &hFF Dim As UByte g = (bgColorNew Shr 8) And &hFF Dim As UByte r = bgColorNew And &hFF Dim As Double lum = GetLuminance(r, g, b) Dim As Double contrastWhite = (1.0 + 0.05) / (lum + 0.05) Dim As Double contrastBlack = (lum + 0.05) / (0.0 + 0.05) If contrastWhite > contrastBlack Then Return &hFFFFFF Return 0 End Function
https://github.com/XusinboyBekchanov/Vi ... 3549f5eb45
Thanks.
-
- Posts: 877
- Joined: Jul 26, 2018 18:28
Re: VisualFBEditor - IDE for FreeBasic
Fixed: Initial painting of ListControl in Dark mode:UEZ wrote: ↑Apr 19, 2025 11:22 Thanks!
One issue I found when you start the IDE and go to Options -> Code Editor -> Colors and Fonts then the color for the text is the same as the background:
When I click to the listview than all text colors will be set properly.
When you close options and go back to options text looks good.
https://github.com/XusinboyBekchanov/My ... 99d83690d5
Thanks.
Re: VisualFBEditor - IDE for FreeBasic
Good now - thx.