GUI library for Windows \ Linux (window9)
Re: GUI library for Windows \ Linux (window9)
Update:
A very small but useful fix. Previously, there was no navigation to gadgets (use the TAB key) that are disabled. Everything should be fine now.
A very small but useful fix. Previously, there was no navigation to gadgets (use the TAB key) that are disabled. Everything should be fine now.
-
- Posts: 293
- Joined: Jul 15, 2021 7:23
- Location: Greece
- Contact:
Re: GUI library for Windows \ Linux (window9)
Hello i think i came across a bug:
i get errors:
Building Project: SetComboBoxItemText......
c:/users/demos/bin/freebasic-1.10.1-winlibs-gcc-9.3.0/fbc64.exe -x "SetComboBoxItemText.exe" -m "SetComboBoxItemText" -b "SetComboBoxItemText.bas" -i "C:/Users/demos/Bin/FreeBASIC-1.10.0-winlibs-gcc-9.3.0/inc" -p "C:/Users/demos/Bin/FreeBASIC-1.10.0-winlibs-gcc-9.3.0/lib/win64" -s gui
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(23) error 4: Duplicated definition, __STRINGIFY in '#define __STRINGIFY(x) #x'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(24) error 4: Duplicated definition, __MINGW64_STRINGIFY in '#define __MINGW64_STRINGIFY(x) __STRINGIFY(x)'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(38) error 4: Duplicated definition, __MINGW_IMP_SYMBOL in '#define __MINGW_IMP_SYMBOL(sym) _imp__##sym'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(39) error 4: Duplicated definition, __MINGW_IMP_LSYMBOL in '#define __MINGW_IMP_LSYMBOL(sym) __imp__##sym'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(40) error 4: Duplicated definition, __MINGW_USYMBOL in '#define __MINGW_USYMBOL(sym) _##sym'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(41) error 4: Duplicated definition, __MINGW_LSYMBOL in '#define __MINGW_LSYMBOL(sym) sym'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(46) error 4: Duplicated definition, __MSABI_LONG in '#define __MSABI_LONG(x) x##l'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(78) error 4: Duplicated definition, _CRT_INSECURE_DEPRECATE_MEMORY in '#define _CRT_INSECURE_DEPRECATE_MEMORY(_Replacement)'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(79) error 4: Duplicated definition, _CRT_INSECURE_DEPRECATE_GLOBALS in '#define _CRT_INSECURE_DEPRECATE_GLOBALS(_Replacement)'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(81) error 4: Duplicated definition, _CRT_OBSOLETE in '#define _CRT_OBSOLETE(_NewItem)'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(81) error 133: Too many errors, exiting
Compile Error...
Code: Select all
#Include "window9.bi"
#Ifdef __FB_WIN32__
Var h = 80
#Else
Var h = 30
#EndIf
OpenWindow("",10,10,300,100)
ComboBoxGadget(1,10,10,100,h)
AddComboBoxItem(1,"Hello0",-1)
AddComboBoxItem(1,"Hello1",-1)
AddComboBoxItem(1,"Hello2",-1)
ButtonGadget(2,150,10,100,25,"Replace")
Do
var event=WaitEvent()
If event=eventclose Then End
If event=eventgadget Then
If eventnumber()=2 Then
SetComboBoxItemText(1,"New Text",1)
EndIf
EndIf
Loop
Building Project: SetComboBoxItemText......
c:/users/demos/bin/freebasic-1.10.1-winlibs-gcc-9.3.0/fbc64.exe -x "SetComboBoxItemText.exe" -m "SetComboBoxItemText" -b "SetComboBoxItemText.bas" -i "C:/Users/demos/Bin/FreeBASIC-1.10.0-winlibs-gcc-9.3.0/inc" -p "C:/Users/demos/Bin/FreeBASIC-1.10.0-winlibs-gcc-9.3.0/lib/win64" -s gui
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(23) error 4: Duplicated definition, __STRINGIFY in '#define __STRINGIFY(x) #x'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(24) error 4: Duplicated definition, __MINGW64_STRINGIFY in '#define __MINGW64_STRINGIFY(x) __STRINGIFY(x)'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(38) error 4: Duplicated definition, __MINGW_IMP_SYMBOL in '#define __MINGW_IMP_SYMBOL(sym) _imp__##sym'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(39) error 4: Duplicated definition, __MINGW_IMP_LSYMBOL in '#define __MINGW_IMP_LSYMBOL(sym) __imp__##sym'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(40) error 4: Duplicated definition, __MINGW_USYMBOL in '#define __MINGW_USYMBOL(sym) _##sym'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(41) error 4: Duplicated definition, __MINGW_LSYMBOL in '#define __MINGW_LSYMBOL(sym) sym'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(46) error 4: Duplicated definition, __MSABI_LONG in '#define __MSABI_LONG(x) x##l'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(78) error 4: Duplicated definition, _CRT_INSECURE_DEPRECATE_MEMORY in '#define _CRT_INSECURE_DEPRECATE_MEMORY(_Replacement)'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(79) error 4: Duplicated definition, _CRT_INSECURE_DEPRECATE_GLOBALS in '#define _CRT_INSECURE_DEPRECATE_GLOBALS(_Replacement)'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(81) error 4: Duplicated definition, _CRT_OBSOLETE in '#define _CRT_OBSOLETE(_NewItem)'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(81) error 133: Too many errors, exiting
Compile Error...
-
- Posts: 293
- Joined: Jul 15, 2021 7:23
- Location: Greece
- Contact:
Re: GUI library for Windows \ Linux (window9)
well i recreate the project in poseidon and it compiles correctly...demosthenesk wrote: ↑Aug 13, 2024 7:00 Hello i think i came across a bug:
i get errors:Code: Select all
#Include "window9.bi" #Ifdef __FB_WIN32__ Var h = 80 #Else Var h = 30 #EndIf OpenWindow("",10,10,300,100) ComboBoxGadget(1,10,10,100,h) AddComboBoxItem(1,"Hello0",-1) AddComboBoxItem(1,"Hello1",-1) AddComboBoxItem(1,"Hello2",-1) ButtonGadget(2,150,10,100,25,"Replace") Do var event=WaitEvent() If event=eventclose Then End If event=eventgadget Then If eventnumber()=2 Then SetComboBoxItemText(1,"New Text",1) EndIf EndIf Loop
Building Project: SetComboBoxItemText......
c:/users/demos/bin/freebasic-1.10.1-winlibs-gcc-9.3.0/fbc64.exe -x "SetComboBoxItemText.exe" -m "SetComboBoxItemText" -b "SetComboBoxItemText.bas" -i "C:/Users/demos/Bin/FreeBASIC-1.10.0-winlibs-gcc-9.3.0/inc" -p "C:/Users/demos/Bin/FreeBASIC-1.10.0-winlibs-gcc-9.3.0/lib/win64" -s gui
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(23) error 4: Duplicated definition, __STRINGIFY in '#define __STRINGIFY(x) #x'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(24) error 4: Duplicated definition, __MINGW64_STRINGIFY in '#define __MINGW64_STRINGIFY(x) __STRINGIFY(x)'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(38) error 4: Duplicated definition, __MINGW_IMP_SYMBOL in '#define __MINGW_IMP_SYMBOL(sym) _imp__##sym'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(39) error 4: Duplicated definition, __MINGW_IMP_LSYMBOL in '#define __MINGW_IMP_LSYMBOL(sym) __imp__##sym'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(40) error 4: Duplicated definition, __MINGW_USYMBOL in '#define __MINGW_USYMBOL(sym) _##sym'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(41) error 4: Duplicated definition, __MINGW_LSYMBOL in '#define __MINGW_LSYMBOL(sym) sym'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(46) error 4: Duplicated definition, __MSABI_LONG in '#define __MSABI_LONG(x) x##l'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(78) error 4: Duplicated definition, _CRT_INSECURE_DEPRECATE_MEMORY in '#define _CRT_INSECURE_DEPRECATE_MEMORY(_Replacement)'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(79) error 4: Duplicated definition, _CRT_INSECURE_DEPRECATE_GLOBALS in '#define _CRT_INSECURE_DEPRECATE_GLOBALS(_Replacement)'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(81) error 4: Duplicated definition, _CRT_OBSOLETE in '#define _CRT_OBSOLETE(_NewItem)'
C:\Users\demos\Bin\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\win\_mingw.bi(81) error 133: Too many errors, exiting
Compile Error...
i dont know what it was
Re: GUI library for Windows \ Linux (window9)
Hi, I use "window9" to create fairly simple control programs as GUIs.
I need to create a rather simple terminal emulator within an existing window9 project.
I need a scrollable text pane which I can do nicely using "editText" with "readonly" set.
I also need a single line box for user input that supports simple editing (cursor,insert,home/end) and returns when "enter" is pressed but I am struggling to figure out how to do this in window9.
What is the best way to do this?? perhaps with an example?
Regards,
Dave
I need to create a rather simple terminal emulator within an existing window9 project.
I need a scrollable text pane which I can do nicely using "editText" with "readonly" set.
I also need a single line box for user input that supports simple editing (cursor,insert,home/end) and returns when "enter" is pressed but I am struggling to figure out how to do this in window9.
What is the best way to do this?? perhaps with an example?
Regards,
Dave
Re: GUI library for Windows \ Linux (window9)
Hi,
I'm trying to learn how to use this library, coming from a PureBasic background, and struggling to find the latest version of the English help file as a chm file. I got a version from https://www.dropbox.com/s/316dkvxasa0sh ... 9.chm?dl=1, but it says 2022 and is seemingly not the latest. The link in the first post only brings me to a Russian page, with no option visible to my screen reader allowing me to switch the language. Any tips here?
Thanks!
I'm trying to learn how to use this library, coming from a PureBasic background, and struggling to find the latest version of the English help file as a chm file. I got a version from https://www.dropbox.com/s/316dkvxasa0sh ... 9.chm?dl=1, but it says 2022 and is seemingly not the latest. The link in the first post only brings me to a Russian page, with no option visible to my screen reader allowing me to switch the language. Any tips here?
Thanks!
Re: GUI library for Windows \ Linux (window9)
Hi again,
I'm also hitting another problem. As I mentioned the only page I could find was Russian, and it seems that the libraries I downloaded didn't work with English texts. I ran build.bat and it worked, but the .a file is under a megabyte and I think it built as ascii. How can I insure it builds as unicode?
Thanks!
I'm also hitting another problem. As I mentioned the only page I could find was Russian, and it seems that the libraries I downloaded didn't work with English texts. I ran build.bat and it worked, but the .a file is under a megabyte and I think it built as ascii. How can I insure it builds as unicode?
Thanks!
Re: GUI library for Windows \ Linux (window9)
Use this link https://sourceforge.net/projects/guiwindow9/files/ to get current version.
The help file exists also in english.
For using UNICODE get the UNICODE version of libwindow9.a in folder window9/Bin/Win64/UNICODE/ from zip file (or Win32 according the bitness).
Then in window9.bi uncomment this line '#Define UNICODE.
I'm a hard user of W9 so feel free to ask more if needed.
The help file exists also in english.
For using UNICODE get the UNICODE version of libwindow9.a in folder window9/Bin/Win64/UNICODE/ from zip file (or Win32 according the bitness).
Then in window9.bi uncomment this line '#Define UNICODE.
I'm a hard user of W9 so feel free to ask more if needed.
Re: GUI library for Windows \ Linux (window9)
Hi SARG,
Thanks so much, this worked amazingly!
Also it turns out, I didn't have to rebuilt Window9 at all, I just forgot to #define Unicode at the top of my script
Thanks for all your help and support!
Thanks so much, this worked amazingly!
Also it turns out, I didn't have to rebuilt Window9 at all, I just forgot to #define Unicode at the top of my script

Thanks for all your help and support!
Re: GUI library for Windows \ Linux (window9)
Thanks to OP for this absolutely amazing library! FreeBASIC with Windows 9 is rapidly becoming my favorite way to make software 
Slight bug report though, the English documentation's EnumSettingsDisplay function has an extra hyperlink at the top, between the two headings.
Is it possible for users to contribute to the documentation? I imagine I could've very easily fixed this and pushed a pull request or something simlar.
Thanks again for all your great work!

Slight bug report though, the English documentation's EnumSettingsDisplay function has an extra hyperlink at the top, between the two headings.
Is it possible for users to contribute to the documentation? I imagine I could've very easily fixed this and pushed a pull request or something simlar.
Thanks again for all your great work!
Re: GUI library for Windows \ Linux (window9)
I don't see it. Can you show exactly where it's.Slight bug report though, the English documentation's EnumSettingsDisplay function has an extra hyperlink at the top, between the two headings.
-
- Posts: 4670
- Joined: Jan 02, 2017 0:34
- Location: UK
- Contact:
Re: GUI library for Windows \ Linux (window9)
I thought it about time I had a look at window9.
Unfortunately, the installation instructions on this thread's opening page don't make sense nowadays.
Can anyone help on this?
Unfortunately, the installation instructions on this thread's opening page don't make sense nowadays.
Can anyone help on this?
Re: GUI library for Windows \ Linux (window9)
The instructions aren't wrong, but they are incomplete. There are now two versions of the .a file for each compiler: one for ascii and one for unicode. I tried to alter the include to pick the correct one when compiling but that didn't work and I'm not sure why. Instead I just took the unicode version of the .a file and dropped it in the appropriate lib folder. I also had to alter the _build.bat to point to my FB install since it assumes FBC is on the path and also that it is just named FBC, where as I have a 32 and 64bit one.
EDIT: Oh, I see. there are no examples in that download. That is just the source to build the library. Well, that worked as it should, then I guess. With the exception of having to alter the _build.bat for my compiler.
EDIT #2: I just realized that probably didn't help you much. My mistake. I took the contents of the inc and lib folders in the zip exactly as is and copy/pasted them into my FBC install. Then I copied the window9.a libs from UNICODE into the lib\win32 and lib\win64 respectively.
EDIT: Oh, I see. there are no examples in that download. That is just the source to build the library. Well, that worked as it should, then I guess. With the exception of having to alter the _build.bat for my compiler.
EDIT #2: I just realized that probably didn't help you much. My mistake. I took the contents of the inc and lib folders in the zip exactly as is and copy/pasted them into my FBC install. Then I copied the window9.a libs from UNICODE into the lib\win32 and lib\win64 respectively.
Re: GUI library for Windows \ Linux (window9)
@deltarho
What is your problem ? exactly. And on Linux/Windows ?
What is your problem ? exactly. And on Linux/Windows ?
-
- Posts: 4670
- Joined: Jan 02, 2017 0:34
- Location: UK
- Contact:
Re: GUI library for Windows \ Linux (window9)
@imortis
There isn't a 'lib folder'.
I managed to use the correct library for Win32 and Unicode, so writing code to cover all four libraries in "window9.bi" should be straight forward. However, the 'z' library could not be found. zlib.bi refers to a lib folder - but there isn't one!.
I need installation instructions for 2025.
I could probably sort it out, but I shouldn't have to.
I will stay with José Roca's WinFBX Framework.
@SARG: Windows
There isn't a 'lib folder'.
I managed to use the correct library for Win32 and Unicode, so writing code to cover all four libraries in "window9.bi" should be straight forward. However, the 'z' library could not be found. zlib.bi refers to a lib folder - but there isn't one!.
They are in 2025.The instructions aren't wrong
I need installation instructions for 2025.
I could probably sort it out, but I shouldn't have to.
I will stay with José Roca's WinFBX Framework.

@SARG: Windows
Re: GUI library for Windows \ Linux (window9)
My mistake. You are right. The zip forwindow9 doesn't have a "lib" folder. But a quick look around in the zip uncovered the Bin folder with the win32 and win64 folders in it. If you open either of those folders you will find a window9.a file. So I should have said "Bin" and "inc" instead.deltarho[1859] wrote: ↑Apr 03, 2025 16:48 @imortis
There isn't a 'lib folder'.
...
However, the 'z' library could not be found. zlib.bi refers to a lib folder - but there isn't one!.
Also, the first post contains a link to a forum post with a download for zlib.
Don't get me wrong: I understand dealing with libraries in FB can be a giant pain. I would like to see something done to make it easier. Also, this package could be altered to make it less confusing to use.
Aside from having to place the window9.a file, the directions worked.