FreeBasic IDE-poseidonFB(Update 2024.03.03)

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

Re: FreeBasic IDE-poseidonFB(Update 2023.09.12)

Post by UEZ »

shadow008 wrote: Nov 21, 2023 3:56
UEZ wrote: Nov 20, 2023 21:41 Yes, I'm on a laptop but it occurs also when laptop is connected to a docking station and working with external mouse. With other editors, such as Notepad++, SciTE, etc. I don't have the problem - only with poseidonFB.
Well now I have to ask: is it a Lenovo laptop? I've had a problem with the trackpad in other things, but it's only ever about the double click behavior. Not that it's trackpad related in your case, but maybe there's some weird custom driver on it that causes this.
No, an HP Elitebook.
Kuan Hsu
Posts: 587
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2023.09.12)

Post by Kuan Hsu »

UEZ wrote: Nov 20, 2023 15:48 I have an annoying problem. It often happens that the cursor is anchored and the area is highlighted when the mouse is moved. When writing, the area is then overwritten. I always have to click in the editor to unlock it.
Is there any way to turn it off?

Thx.
It's strange.
Try to turn 'Options' -> 'Preference' -> 'Editor' -> 'Enable Document Multi Selection' off
UEZ
Posts: 988
Joined: May 05, 2017 19:59
Location: Germany

Re: FreeBasic IDE-poseidonFB(Update 2023.09.12)

Post by UEZ »

Kuan Hsu wrote: Nov 27, 2023 1:38
UEZ wrote: Nov 20, 2023 15:48 I have an annoying problem. It often happens that the cursor is anchored and the area is highlighted when the mouse is moved. When writing, the area is then overwritten. I always have to click in the editor to unlock it.
Is there any way to turn it off?

Thx.
It's strange.
Try to turn 'Options' -> 'Preference' -> 'Editor' -> 'Enable Document Multi Selection' off
thx KuanHsu, but it already turned off.
xiaoyao
Posts: 121
Joined: May 05, 2020 2:01

Re: FreeBasic IDE-poseidonFB(Update 2023.09.12)

Post by xiaoyao »

how to freebasic do like vb6 ?
new form1 clone

new form1,new form2?
form1.frm

Code: Select all

Option Explicit
Dim F2a As New Form2, F2b As New Form2
Private Sub Command1_Click()
F2a.Show
F2b.Show

F2a.Form2_abc = 11
F2b.Form2_abc = 22
F2a.Caption = "Form2_a"
F2b.Caption = "Form2_b"

MsgBox F2a.Form2_abc
MsgBox F2b.Form2_abc

End Sub
form2.frm

Code: Select all

Public Form2_abc As Long
Public Sub Form2_Test()
    MsgBox "it's form2 Test"
End Sub
Xusinboy Bekchanov
Posts: 792
Joined: Jul 26, 2018 18:28

Re: FreeBasic IDE-poseidonFB(Update 2023.09.12)

Post by Xusinboy Bekchanov »

xiaoyao wrote: Dec 28, 2023 11:20 how to freebasic do like vb6 ?
new form1 clone

new form1,new form2?
form1.frm

Code: Select all

Option Explicit
Dim F2a As New Form2, F2b As New Form2
Private Sub Command1_Click()
F2a.Show
F2b.Show

F2a.Form2_abc = 11
F2b.Form2_abc = 22
F2a.Caption = "Form2_a"
F2b.Caption = "Form2_b"

MsgBox F2a.Form2_abc
MsgBox F2b.Form2_abc

End Sub
form2.frm

Code: Select all

Public Form2_abc As Long
Public Sub Form2_Test()
    MsgBox "it's form2 Test"
End Sub
You can do this:
Form1.frm

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/CommandButton.bi"
	#include once "Form2.frm"
	
	Using My.Sys.Forms
	
	Type Form1Type Extends Form
		Declare Sub CommandButton1_Click(ByRef Sender As Control)
		Declare Constructor
		
		Dim As CommandButton CommandButton1
		Dim F2a As Form2Type Ptr = New Form2Type
		Dim F2b As Form2Type Ptr = New Form2Type
	End Type
	
	Constructor Form1Type
		' Form1
		With This
			.Name = "Form1"
			.Text = "Form1"
			.Designer = @This
			.SetBounds 0, 0, 350, 300
		End With
		' CommandButton1
		With CommandButton1
			.Name = "CommandButton1"
			.Text = "CommandButton1"
			.TabIndex = 0
			.SetBounds 80, 110, 160, 50
			.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 Form1Type.CommandButton1_Click(ByRef Sender As Control)
	F2a->Show
	F2b->Show

	F2a->Form2_abc = 11
	F2b->Form2_abc = 22
	F2a->Caption = "Form2_a"
	F2b->Caption = "Form2_b"

	MsgBox Str(F2a->Form2_abc)
	MsgBox Str(F2b->Form2_abc)
End Sub
Form2.frm

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"
	
	Using My.Sys.Forms
	
	Type Form2Type Extends Form
		Declare Constructor
		
	Public:
		Form2_abc As Long
		Declare Sub Form2_Test
	End Type
	
	Constructor Form2Type
		' Form2
		With This
			.Name = "Form2"
			.Text = "Form2"
			.Designer = @This
			.SetBounds 0, 0, 350, 300
		End With
	End Constructor
	
	Dim Shared Form2 As Form2Type
	
	#if _MAIN_FILE_ = __FILE__
		App.DarkMode = True
		Form2.MainForm = True
		Form2.Show
		App.Run
	#endif
'#End Region

Public Sub Form2Type.Form2_Test
	MsgBox "it's form2 Test"
End Sub
To do this you need this library: https://freebasic.net/forum/viewtopic.php?t=28397
Xusinboy Bekchanov
Posts: 792
Joined: Jul 26, 2018 18:28

Re: FreeBasic IDE-poseidonFB(Update 2023.09.12)

Post by Xusinboy Bekchanov »

Or you can do this:

Form1.frm

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/CommandButton.bi"
	#include once "Form2.frm"
	
	Using My.Sys.Forms
	
	Type Form1Type Extends Form
		Declare Sub CommandButton1_Click(ByRef Sender As Control)
		Declare Constructor
		
		Dim As CommandButton CommandButton1
		Dim F2a As Form2Type
		Dim F2b As Form2Type
	End Type
	
	Constructor Form1Type
		' Form1
		With This
			.Name = "Form1"
			.Text = "Form1"
			.Designer = @This
			.SetBounds 0, 0, 350, 300
		End With
		' CommandButton1
		With CommandButton1
			.Name = "CommandButton1"
			.Text = "CommandButton1"
			.TabIndex = 0
			.SetBounds 80, 110, 160, 50
			.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 Form1Type.CommandButton1_Click(ByRef Sender As Control)
	F2a.Show
	F2b.Show

	F2a.Form2_abc = 11
	F2b.Form2_abc = 22
	F2a.Caption = "Form2_a"
	F2b.Caption = "Form2_b"

	MsgBox Str(F2a.Form2_abc)
	MsgBox Str(F2b.Form2_abc)
End Sub
AWPStar
Posts: 47
Joined: May 03, 2009 21:47

Re: FreeBasic IDE-poseidonFB(Update 2023.09.12)

Post by AWPStar »

1)
I get a lot of errors when i run it by clicking on BAS-file.
"icon/xpm/outline/....xpm isn't existed!"
And std.file.FileExecption@std\file.d(451): settings/compilerOpstionsFB.txt at the end

When i run just poseidonFB.exe alone - no error messages.

When i place "icons" folder into the place where i open bas-file from, i get only last error.

So it seems that poseidonFB sets current folder wrong.

2)
IDE Crashes while compiling and permission denied message appears.


btw. How can i get rid of "Are you sure exit poseidon?" when i close window, even if there is no open files?
Kuan Hsu
Posts: 587
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2023.09.12)

Post by Kuan Hsu »

AWPStar wrote: Jan 31, 2024 11:46 1)
I get a lot of errors when i run it by clicking on BAS-file.
"icon/xpm/outline/....xpm isn't existed!"
And std.file.FileExecption@std\file.d(451): settings/compilerOpstionsFB.txt at the end

When i run just poseidonFB.exe alone - no error messages.

When i place "icons" folder into the place where i open bas-file from, i get only last error.

So it seems that poseidonFB sets current folder wrong.

2)
IDE Crashes while compiling and permission denied message appears.


btw. How can i get rid of "Are you sure exit poseidon?" when i close window, even if there is no open files?
(1) It should be fixed at rev.526
(2) I need more message, please~~
(3) Yes, but next rev.
AWPStar
Posts: 47
Joined: May 03, 2009 21:47

Re: FreeBasic IDE-poseidonFB(Update 2024.03.03)

Post by AWPStar »

Thank you for the response!

2) There is option "Before Compile, Delete Existed Execure File"
If it is checked, and and FBC get "Permission denied"(executable is running or blocked(handle opened)) then poseidonFB shows message "std.file.FileException@std\file.d(1061)" and crashes.

Also, i used to click(LMB) on #include file with Control button to open it. Now that doesn't work and there's no option to choose mouse click in hotkeys.
Now it's only available by clicking "Goto definition" at the menu.

Is there a way to make my own plugin with access to code inside the editor? I would like make code formatter. That would be nice to have ability to create menus options, windows e.t.c
Kuan Hsu
Posts: 587
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2024.03.03)

Post by Kuan Hsu »

AWPStar wrote: Mar 07, 2024 10:28 Thank you for the response!

2) There is option "Before Compile, Delete Existed Execure File"
If it is checked, and and FBC get "Permission denied"(executable is running or blocked(handle opened)) then poseidonFB shows message "std.file.FileException@std\file.d(1061)" and crashes.

Also, i used to click(LMB) on #include file with Control button to open it. Now that doesn't work and there's no option to choose mouse click in hotkeys.
Now it's only available by clicking "Goto definition" at the menu.

Is there a way to make my own plugin with access to code inside the editor? I would like make code formatter. That would be nice to have ability to create menus options, windows e.t.c
Sorry reply so late~
(1) It's easy to fix
(2) I've forgotten why I remove the ctrl+LMB for "Goto definition", please use hot-key replace (default = Alt+G)
(3) First your plugin need coding use IUP, the example is: https://bitbucket.org/KuanHsu/poseidon- ... r/FBStyle/
Post Reply