FireFly Visual Designer for FreeBASIC (Updated March 8, 2016)

User projects written in or related to FreeBASIC.
Post Reply
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

FireFly Visual Designer for FreeBASIC (Updated March 8, 2016)

Post by PaulSquires »

EDIT: March 8, 2016 - Download updated to Version 3.78.

The program is freeware so hopefully it will benefit a few people in the community.

Website: http://www.planetsquires.com
Support Forum: http://http://www.planetsquires.com/pro ... /index.php

A few notes are in order just so you know what this program is all about and its limitations:

- It is a visual designer with a built-in code editor very similar to the way that Visual Basic operated in the past.

- It is Windows only. The FireFly exe is 32-bit but it can produce 32-bit and/or 64-bit exe's based on what FreeBASIC compiler you have set up for FireFly to use.

- The FB code that is generated is based on #Lang FB. I doubt that will ever change.

- I wrote the code editor portion from scratch so it may not be as complete or polished as say Scintilla or similar but it does work pretty well. It may not handle unicode based languages.

This version of FireFly for FreeBASIC has been tested with the very latest 32 bit and 64 bit versions of the FreeBASIC compiler.

Good luck! I really hope that this visual designer helps Windows programmers to create programs more easily and quickly than they have in the past.

Paul Squires
PlanetSquires Software
Last edited by PaulSquires on Dec 26, 2021 11:02, edited 20 times in total.
rdc
Posts: 1741
Joined: May 27, 2005 17:22
Location: Texas, USA
Contact:

Post by rdc »

Looks neat Paul. I'll have to give this a try.
BasicScience
Posts: 489
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Post by BasicScience »

Looks very promising. Can you remind me... how to reference the property of a control, once you have the handle and control ID? I tried to make a simple "hello world" app with a cmmd button and label. This doesn't work in

Function FORM1_COMMAND1_BN_CLICKED()

IDC_FORM1_Label1.Caption = "Hello World"
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Post by PaulSquires »

BasicScience wrote:Looks very promising. Can you remind me... how to reference the property of a control, once you have the handle and control ID? I tried to make a simple "hello world" app with a cmmd button and label. This doesn't work in

Function FORM1_COMMAND1_BN_CLICKED()

IDC_FORM1_Label1.Caption = "Hello World"
You would need to use either the WinAPI directly (SetWindowText/GetWindowText) or use one of the hundred or so "FireFly Functions" found in the Functions Library. In this case you could do something like this:

FF_Control_SetText HWND_FORM1_LABEL1, "Hello World"

FireFly does not use the dot "." syntax for accessing or setting properties of a form/control.
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Post by PaulSquires »

rdc wrote:Looks neat Paul. I'll have to give this a try.
Thanks Rick, I appreciate it!
John Spikowski
Posts: 453
Joined: Dec 24, 2005 2:32
Location: WA - USA
Contact:

Post by John Spikowski »

This is really good news Paul. It's great when a commercial package finds it's way into the open source community.
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Post by PaulSquires »

Thanks John - hopefully the program can help fill a need at least on the Windows side of the shop.
BasicScience
Posts: 489
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Post by BasicScience »

* PaulSquires,

Thanks I missed the FF functions. Very intuitive, very powerful. Great work.
BasicScience
Posts: 489
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Post by BasicScience »

Any suggestions for adding graphics primitives (pset, line, circle) to draw on a Form or Picture ?

I see FireLines is not included in the FreeBasic version.. and FireLines would be a cumbersome way to generate 2D plots.
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Post by PaulSquires »

I rarely have a need for dealing with graphic primitives in the type of applications that I write, but you could interface FF3 to any standard graphics DLL package and as long as those libraries can access the device context handle of the Form then you should be able to create the graphics needed.

...or, you could draw the graphics yourself in the WM_PAINT message handler similar to this:

Code: Select all

Function FORM1_WM_PAINT ( _
                        hWndForm      As DWord _  ' handle of Form
                        ) As Integer
                         
   Dim hDC As HDC
                            
   hDC = GetDC( hWndForm )
    
   Rectangle hDC, 10, 10, 100, 100
     
   ReleaseDC hWndForm, hDC                     
 
End Function
Using winapi graphic functions is not overly difficult but it does entail learning the various functions needed and the correct usage of the device context to ensure that you do not get gdi leaks.
Zippy
Posts: 1295
Joined: Feb 10, 2006 18:05

Post by Zippy »

Thanks, Paul, for your efforts AND your generosity. Looks very good, explosions and all.
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Post by PaulSquires »

Thanks Zippy - still work to be done but hopefully it is a good first step.

:-)
BasicScience
Posts: 489
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Post by BasicScience »

Thanks Paul. I was able to perform some simple graphics on the FORM.

Image

I still have a long way to go when it comes to learning about the GDI.

Again, great job... but do you think the frequent crashes for FF3 will be resolved soon?
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Post by PaulSquires »

I guess a lot depends on where the crashes are occurring. In your experience so far, are they happening during the compile process or during the general use of the program, or both? Does it gpf while in the visual designer or the code editor. Does it gpf when loading a project or when exiting the application? I rarely get gpf's when using it with the other programming language...but FB is different and maybe I could be messing up something with the parsing or code generation or shelling to the compiler that is causing something the blow up.
BasicScience
Posts: 489
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Post by BasicScience »

Running WinXP Pro SP3.

Most crashes are from F5 (compile and run). Never got blue screen of death, but did get:

1. Compilation completes, then FF3 closes and exe never launches.

2. FF3 crashes during "compile progress" with progress bar ~ 50%
Win popup "... encountered a problem and needs to close..."
Post Reply