FB_GUI V1.20.4 (New Release Oct 29, 2011)

User projects written in or related to FreeBASIC.
BasicScience
Posts: 475
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Apr 10, 2011 15:58

@ Dinosaur,

As the author of FB_GUI, I would have to agree with TJF. If you're looking for cross-platform compatibility and "best practice" standards of code, GTK+ is much more robust and flexible.

That said, the FB_GUI project is still alive and kicking. I use FB_GUI for applications that perform data acquisition (DLL from Instrutech/HEKA) & analysis, mathematical modelling of physiological systems, and developing teaching software. As a result of heavy "real-world" usage of FB_GUI by our lab group, I can say it's pretty darn robust.

The Win API dependency is primarily for the File_Open dialog box, but I suppose that could be reverse-engineered if it were critical to run on other platforms. I don't have a machine running DOS or Unix, so I have never tested FB_GUI in those environments.

Overall, FB_GUI is a good choice if you want a VB6.0 - like interface, but with the simplicity of FB. The learning curve for FB_GUI is probably shorter than GTK+, and it comes with a CHM manual. In addition, FB_GUI is provided as an include file, with all the source code accessible, so there are no mysteries in compiled DLLs. I'm sure the code could be made more efficient with the new effort at adding Inheritance to FB (see Community Discussion).

As to some details....

1) Buttons are created / refreshed by calling graphics primitives to draw rectangles and custom font (xFont) text. This could be changed to operate on fb.image structure.

2) Adding widgets (buttons and such) in FB_GUI requires a unique number and bumps the count of Ctrl_Num_Total (max 256). You can also GET the Ctrl_Num for any widget if it was given a unique label B[Ctrl_Num].Label = "Any Text Here"

3) Event handling in FB_BUI is via the ScreenEvent function in FB. An event handle wrapper in FB_GUI is built in the PollEvent() function.

Good Luck,
bfuller
Posts: 328
Joined: Jun 02, 2007 12:35
Location: Sydney, Australia

Postby bfuller » Jul 06, 2011 3:57

I am just trying to learn FB_GUI and I'm working with the examples.

When I run the included query.exe it runs fine and closes properly, but when I try to use F5 (Quick Run) from within FBIde, it runs OK but when I say YES to exit, I get the Microsoft "FBIDETEMP.exe has encountered a problem and needs to close" window and am asked if I want to send an error report or not. In fact the same thing happens when I compile from within FBIde too using F9 or Cntl F9.

This is the query.bas code

Code: Select all

'  Example GUI with just a PopUp Query
'
'
#include once "FB_GUI.BI"
#include once "FB_GUI/FB_GUI_LIB.Bas"
screen_height = 150
Screen_width = 250
DIM as byte Answer
SetVideo "Query Example", 1

Do
    Answer = Query("Do you really want to exit?")
    sleep 10
loop until answer

ShutDown


The same thing happens with other examples, and code I have produced myself (by modifying examples).
I notice the ICONs of the included example "exe" files look different to my normal "exe" files.
What am I doing wrong here?
BasicScience
Posts: 475
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Jul 11, 2011 5:07

What happens if you run the complied output, FBIDETEMP.EXE?

Sounds like the issue is how you have FBIDE configured. I'm using Win7 with FBIDE 0.4.7 and I don't get the errors you mention (with F5, F9 or Ctrl-F9).

BasicScience
BasicScience
Posts: 475
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Oct 30, 2011 3:40

Minor bugs fixed. New update. See URL on page 1 of post.
SotSvart
Posts: 262
Joined: May 27, 2005 9:03
Location: Norway
Contact:

Postby SotSvart » Nov 03, 2011 19:06

I'm having trouble getting the download to work, is it only me? =)
BasicScience
Posts: 475
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Nov 04, 2011 2:58

Do you mean the zip file fails to download? Or, that you can't get the routines to work once the file is unzipped?

I just verified the download on google_sites is working. Be sure to get this file: FB_GUI_V1.20.4.zip
nobozoz
Posts: 238
Joined: Nov 17, 2005 6:24
Location: Chino Hills, CA, USA

Postby nobozoz » Nov 05, 2011 22:11

Hello BasicScience.

Just now, I downloaded the file FB_GUI_V1.20.4.zip from the link provided in the opening post on this topic.

When I try to compile and run the examples on WINXP/SP3, many of the source files seem to be corrupted.
Common themes are:
[1] missing CRLF in CASE, SELECT CASE and END SELECT statements and other random places.
[2] "End withend Sub" all on one line at the end of the Sub() instead of
End With
End Sub
[3] statements like: "SUB Serve_TxtBoxend Sub" at the end of the source that fb V.23.0 throws errors like:

SliderH_V.o:fake:(.text+0x1a3d4): undefined reference to `SERVE_TXTBOX@0'

Missing "Declare Sub" where only the Sub's name is given.

Way too buggy to use with confidence.
TJF
Posts: 3486
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Postby TJF » Nov 06, 2011 8:06

nobozoz wrote:[1] missing CRLF in CASE, SELECT CASE and END SELECT statements and other random places.
[2] "End withend Sub" all on one line at the end of the Sub() instead of
End With
End Sub
...
Way too buggy to use with confidence.

You didn't get errors on that when compiling, did you? So fbc understands the code.

What about you IDE / editor? Can you use it with confidence?
BasicScience
Posts: 475
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Nov 06, 2011 17:24

@ Nobozo,

I use FBIde as the IDE with this command line:

"<$fbc>" -lang fb -mt -exx -g "<$file>"

Works fine for me on Win XP SP3 or Win 7 32-bit.

I'm using FB V 0.21.1, but I've not heard from anyone about problems with 0.23.
nobozoz
Posts: 238
Joined: Nov 17, 2005 6:24
Location: Chino Hills, CA, USA

Postby nobozoz » Nov 06, 2011 21:54

I use FBEDIT v1.0.7.6c. I've been using this IDE for over a year and have never had instances of source code chopped up in this way. The closest I ever came to a source code problem in FBEDIT was opening a Linux developed source code with unix-style line end formatting that caused the formatting to break.

I just now set up FBIDE 0.4.6 r3 with fb v.22 and reinstalled FBGUI there. All examples compiled and ran OK. I then copied all the .bas files used with FBIDE over to the original fb 0.23 installation and was able to compile all sources there using FBEDIT.

Thanks for your help. I may have had a one-of-a-kind glitch.

Edit 1: It appears that FBIDE can open unix-style source files correctly and automagically, but FBEDIT, by default, cannot. I found an addin DLL (TextFormatPlugin.dll) for FBEDIT that warns of unix-style files and offers to translate them for consumption by FBEDIT. As a test, I unzipped the original download and attempted to open each of the Example files in FBEDIT using the TextFormatPlugin.dll. Only files "Get_Input_PopUp.bas" and "Mssg_Box.bas" were not flagged by FBEDIT as having incompatible line endings.
Last edited by nobozoz on Nov 07, 2011 21:38, edited 1 time in total.
BasicScience
Posts: 475
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Nov 06, 2011 23:07

Glad you got FB_GUI running. I tried FBEDIT a couple of years ago, but opted for the leaner FBIde. Not sure what the glitch might have been.
OldJohn
Posts: 1
Joined: Feb 23, 2013 19:31

Re: FB_GUI V1.20.4 (New Release Oct 29, 2011)

Postby OldJohn » Feb 24, 2013 2:17

I have run the downloaded example files an they run clean.
When I compile them in FBIDE I get some crashes.
Data_Entry_New crashes when the form button is pressed.
FB_GUI_SHELL crashes when I select the Command13 -17.
Any thoughts?
OldJohn
counting_pine
Site Admin
Posts: 6174
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: FB_GUI V1.20.4 (New Release Oct 29, 2011)

Postby counting_pine » Mar 03, 2013 17:20

Hi OldJohn, welcome to the forum.
Just to say sorry your post has only just been approved. We screen first posts from users because we've had some spambot issues. But sometimes these posts seem to get lost in the cracks for some reason..
BasicScience
Posts: 475
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Re: FB_GUI V1.20.4 (New Release Oct 29, 2011)

Postby BasicScience » Mar 08, 2013 3:14

Hi OldJohn,

Thanks for the interest in FB_GUI.

I just re-compiled FB_GUI 1.20.4 with FBide and all is working well. Rather than attempt to track down your problem, I will post an upgrade in a day or two. We still use FB_GUI every day in our lab, and many small tweaks and bug fixes have been made since my last update in 2011.

Basic Science
RNBW
Posts: 192
Joined: Apr 11, 2015 11:06
Location: UK

Re: FB_GUI V1.20.4 (New Release Oct 29, 2011)

Postby RNBW » Jun 19, 2018 10:09

I'm currently having a look at the available GUIs for FreeBasic and would like to look further at FB_GUI, but I don't appear to have the file xfont.bi in my download https://sites.google.com/site/freebasicgui/freebasicgui-downloads. Where can I download this file?

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 0 guests