VisualFBEditor - IDE for FreeBasic

User projects written in or related to FreeBASIC.
Post Reply
UEZ
Posts: 1035
Joined: May 05, 2017 19:59
Location: Germany

Re: VisualFBEditor - IDE for FreeBasic

Post by UEZ »

Thx.
UEZ
Posts: 1035
Joined: May 05, 2017 19:59
Location: Germany

Re: VisualFBEditor - IDE for FreeBasic

Post by UEZ »

I found one issue. When the editor is not running and *.bas is assigned to VisualFBEditor and I double click on a *.bas file then only the file will be loaded not the other opened files which are saved in the session file. No issue when the editor is running.
Xusinboy Bekchanov
Posts: 850
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

UEZ wrote: Jan 19, 2025 19:00 I found one issue. When the editor is not running and *.bas is assigned to VisualFBEditor and I double click on a *.bas file then only the file will be loaded not the other opened files which are saved in the session file. No issue when the editor is running.
Fixed: Opening the last opened file when specifying a file on the command line:
https://github.com/XusinboyBekchanov/Vi ... 1b7b587690
UEZ
Posts: 1035
Joined: May 05, 2017 19:59
Location: Germany

Re: VisualFBEditor - IDE for FreeBasic

Post by UEZ »

Looks good now but when editor window is minimized (invisible) only and double click on a *.bas file will load the file and bring the editor to the front (restore window) - not when it is already visible then only icon on the taskbar is flashing.
Xusinboy Bekchanov
Posts: 850
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

UEZ wrote: Jan 19, 2025 23:22 Looks good now but when editor window is minimized (invisible) only and double click on a *.bas file will load the file and bring the editor to the front (restore window) - not when it is already visible then only icon on the taskbar is flashing.
If the IDE window is visible then the file will open and the IDE window will become active. I have Windows 10 so the window title will turn blue.
stan1958
Posts: 7
Joined: Oct 24, 2020 21:17

Re: VisualFBEditor - IDE for FreeBasic

Post by stan1958 »

Hi,

How to add new Tabpages dynamically to a TabControl and be able to update controls in them.

not through the Toolbox/containers

Thanks
Xusinboy Bekchanov
Posts: 850
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

stan1958 wrote: Feb 05, 2025 21:33 Hi,

How to add new Tabpages dynamically to a TabControl and be able to update controls in them.

not through the Toolbox/containers

Thanks
Hi,

This is how you can do it:

Code: Select all

'#Region "Form"
	#if defined(__FB_MAIN__) AndAlso Not defined(__MAIN_FILE__)
		#define __MAIN_FILE__
		#ifdef __FB_WIN32__
			#cmdline "Form1.rc"
		#endif
		Const _MAIN_FILE_ = __FILE__
	#endif
	#include once "mff/Form.bi"
	#include once "mff/TabControl.bi"
	#include once "mff/CommandButton.bi"
	
	Using My.Sys.Forms
	
	Type Form1Type Extends Form
		Declare Sub CommandButton1_Click(ByRef Sender As Control)
		Declare Constructor
		
		Dim As TabControl TabControl1
		Dim As CommandButton CommandButton1
	End Type
	
	Constructor Form1Type
		#if _MAIN_FILE_ = __FILE__
			With App
				.CurLanguagePath = ExePath & "/Languages/"
				.CurLanguage = My.Sys.Language
			End With
		#endif
		' Form1
		With This
			.Name = "Form1"
			.Text = "Form1"
			.Designer = @This
			.SetBounds 0, 0, 350, 300
		End With
		' TabControl1
		With TabControl1
			.Name = "TabControl1"
			.Text = "TabControl1"
			.TabIndex = 0
			.SetBounds 20, 50, 240, 150
			.Designer = @This
			.Parent = @This
		End With
		' CommandButton1
		With CommandButton1
			.Name = "CommandButton1"
			.Text = "Add Tab Page"
			.TabIndex = 1
			.Caption = "Add Tab Page"
			.SetBounds 10, 210, 120, 30
			.Designer = @This
			.OnClick = Cast(Sub(ByRef Designer As My.Sys.Object, ByRef Sender As Control), @CommandButton1_Click)
			.Parent = @This
		End With
	End Constructor
	
	Dim Shared Form1 As Form1Type
	
	#if _MAIN_FILE_ = __FILE__
		App.DarkMode = True
		Form1.MainForm = True
		Form1.Show
		App.Run
	#endif
'#End Region

Private Sub NewCommandButton_Click(ByRef Designer As My.Sys.Object, ByRef Sender As Control)
	MsgBox Sender.Text
End Sub

Private Sub Form1Type.CommandButton1_Click(ByRef Sender As Control)
	Var NewTabPage = TabControl1.AddTab("New Tab 1")
	Var NewCommandButton = New CommandButton
	NewCommandButton->Text = "New CommandButton"
	NewCommandButton->SetBounds 10, 10, 150, 30
	NewCommandButton->OnClick = @NewCommandButton_Click
	NewTabPage->Add NewCommandButton
	Var NewTabPage2 = TabControl1.AddTab("New Tab 2")
End Sub
stan1958
Posts: 7
Joined: Oct 24, 2020 21:17

Re: VisualFBEditor - IDE for FreeBasic

Post by stan1958 »

Many Thanks :D
Luis Candelas
Posts: 4
Joined: Feb 23, 2025 18:26

Re: VisualFBEditor - IDE for FreeBasic

Post by Luis Candelas »

Hi
I'm trying out VisualFbeditor and I like it a lot, but I've run into a problem that I'll tell you about:
Using the wizard I create a new windows project.
I create a new form and insert a command button. A form1.bas and a form1.frm are created.
I compile without problems but only the empty form is displayed.

However, if I create it as new and compile, everything works correctly.
What could be the problem?
Xusinboy Bekchanov
Posts: 850
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

Luis Candelas wrote: Feb 23, 2025 18:31 Hi
I'm trying out VisualFbeditor and I like it a lot, but I've run into a problem that I'll tell you about:
Using the wizard I create a new windows project.
I create a new form and insert a command button. A form1.bas and a form1.frm are created.
I compile without problems but only the empty form is displayed.

However, if I create it as new and compile, everything works correctly.
What could be the problem?
Hello, maybe you have created a Windows Application. In this type of project all forms are created manually using WinAPI. If you want to create a cross-platform graphical application then create a project using GUI Application.
Luis Candelas
Posts: 4
Joined: Feb 23, 2025 18:26

Re: VisualFBEditor - IDE for FreeBasic

Post by Luis Candelas »

Correct, you are absolutely right.
Thanks a lot.
lenoil98
Posts: 22
Joined: Feb 16, 2021 0:13
Location: USA

Re: VisualFBEditor - IDE for FreeBasic

Post by lenoil98 »

Attempting to on FreeBSD usinf fbc-1.10.1. I'm getting the below error, on both x86_64 and powerpc64:

Code: Select all

FreeBASIC Compiler - Version 1.10.1 (2025-03-04), built for freebsd-powerpc64 (64bit)
Copyright (C) 2004-2023 The FreeBASIC development team.
target:       freebsd-powerpc64, powerpc64, 64bit
backend:      gcc
compiling:    VisualFBEditor.bas -o VisualFBEditor.c (main module)
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(20) error 14: Expected identifier, found 'List' in 'FItems   As List'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(49) error 3: Expected End-of-Line, found '.' in 'Return FItems.Count'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(54) error 7: Expected ')', found '.' in 'Return QPointerListItem(FItems.Items[Index]).Value'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(61) error 7: Expected ')', found '.' in 'Return QPointerListItem(FItems.Items[Index]).Value'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(68) error 7: Expected ')', found '.' in 'QPointerListItem(FItems.Items[Index]).Value = Value'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(74) error 7: Expected ')', found '.' in 'Return QPointerListItem(FItems.Items[Index]).Object'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(81) error 7: Expected ')', found '.' in 'QPointerListItem(FItems.Items[Index]).Object = Value'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(91) error 10: Expected '=', found '.' in 'FItems.Add nItem'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(100) error 10: Expected '=', found '.' in 'FItems.Insert Index, nItem'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(104) error 10: Expected '=', found '.' in 'FItems.Exchange(Index1, Index2)'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(104) error 133: Too many errors, exiting
Check to see if anyone can help.

Thanks in advance.
Xusinboy Bekchanov
Posts: 850
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

lenoil98 wrote: Mar 04, 2025 16:02 Attempting to on FreeBSD usinf fbc-1.10.1. I'm getting the below error, on both x86_64 and powerpc64:

Code: Select all

FreeBASIC Compiler - Version 1.10.1 (2025-03-04), built for freebsd-powerpc64 (64bit)
Copyright (C) 2004-2023 The FreeBASIC development team.
target:       freebsd-powerpc64, powerpc64, 64bit
backend:      gcc
compiling:    VisualFBEditor.bas -o VisualFBEditor.c (main module)
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(20) error 14: Expected identifier, found 'List' in 'FItems   As List'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(49) error 3: Expected End-of-Line, found '.' in 'Return FItems.Count'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(54) error 7: Expected ')', found '.' in 'Return QPointerListItem(FItems.Items[Index]).Value'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(61) error 7: Expected ')', found '.' in 'Return QPointerListItem(FItems.Items[Index]).Value'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(68) error 7: Expected ')', found '.' in 'QPointerListItem(FItems.Items[Index]).Value = Value'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(74) error 7: Expected ')', found '.' in 'Return QPointerListItem(FItems.Items[Index]).Object'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(81) error 7: Expected ')', found '.' in 'QPointerListItem(FItems.Items[Index]).Object = Value'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(91) error 10: Expected '=', found '.' in 'FItems.Add nItem'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(100) error 10: Expected '=', found '.' in 'FItems.Insert Index, nItem'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(104) error 10: Expected '=', found '.' in 'FItems.Exchange(Index1, Index2)'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(104) error 133: Too many errors, exiting
Check to see if anyone can help.

Thanks in advance.
The List type is present in the included file List.bi. The compiler should find it.
lenoil98
Posts: 22
Joined: Feb 16, 2021 0:13
Location: USA

Re: VisualFBEditor - IDE for FreeBasic

Post by lenoil98 »

Xusinboy Bekchanov wrote: Mar 04, 2025 16:38
lenoil98 wrote: Mar 04, 2025 16:02 Attempting to on FreeBSD usinf fbc-1.10.1. I'm getting the below error, on both x86_64 and powerpc64:

Code: Select all

FreeBASIC Compiler - Version 1.10.1 (2025-03-04), built for freebsd-powerpc64 (64bit)
Copyright (C) 2004-2023 The FreeBASIC development team.
target:       freebsd-powerpc64, powerpc64, 64bit
backend:      gcc
compiling:    VisualFBEditor.bas -o VisualFBEditor.c (main module)
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(20) error 14: Expected identifier, found 'List' in 'FItems   As List'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(49) error 3: Expected End-of-Line, found '.' in 'Return FItems.Count'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(54) error 7: Expected ')', found '.' in 'Return QPointerListItem(FItems.Items[Index]).Value'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(61) error 7: Expected ')', found '.' in 'Return QPointerListItem(FItems.Items[Index]).Value'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(68) error 7: Expected ')', found '.' in 'QPointerListItem(FItems.Items[Index]).Value = Value'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(74) error 7: Expected ')', found '.' in 'Return QPointerListItem(FItems.Items[Index]).Object'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(81) error 7: Expected ')', found '.' in 'QPointerListItem(FItems.Items[Index]).Object = Value'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(91) error 10: Expected '=', found '.' in 'FItems.Add nItem'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(100) error 10: Expected '=', found '.' in 'FItems.Insert Index, nItem'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(104) error 10: Expected '=', found '.' in 'FItems.Exchange(Index1, Index2)'
/root/Devel/VisualFBEditor-1.3.6/Controls/MyFbFramework/mff/PointerList.bi(104) error 133: Too many errors, exiting
Check to see if anyone can help.

Thanks in advance.
The List type is present in the included file List.bi. The compiler should find it.
I had discovered it, but for some reason the compiler is not picking it up. I've even tried different compilers, but always get the same result.
Post Reply