VisualFBEditor - IDE for FreeBasic

User projects written in or related to FreeBASIC.
Post Reply
Xusinboy Bekchanov
Posts: 783
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

For even better development of the library MyFbFramework, I changed the license as in LCL.

Changed: License to modifiedLGPL:
https://github.com/XusinboyBekchanov/My ... 4694e16731
flaviofornazier
Posts: 59
Joined: Oct 10, 2015 7:19
Location: Brazil

Re: VisualFBEditor - IDE for FreeBasic

Post by flaviofornazier »

Mr.Bekchanov,

Can you give us one or two examples of TAG property usage?

How can I set/get strings and arrays?

Thank you in advanced.
Last edited by flaviofornazier on Aug 30, 2022 4:21, edited 1 time in total.
oyster
Posts: 274
Joined: Oct 11, 2005 10:46

Re: VisualFBEditor - IDE for FreeBasic

Post by oyster »

Xusinboy Bekchanov wrote: Aug 29, 2022 6:25 For even better development of the library MyFbFramework, I changed the license as in LCL.

Changed: License to modifiedLGPL:
https://github.com/XusinboyBekchanov/My ... 4694e16731
too long and too many jargons.
can anyone give clear answers to these questions in normal human's sentences?
1. can user use MyFbFramework in commercial application without paying money for MyFbFramework, without needing to give the source code to anybody else
2. can user use his owen modified MyFbFramework without opening his modification
Xusinboy Bekchanov
Posts: 783
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

flaviofornazier wrote: Aug 30, 2022 4:16 Mr.Bekchanov,

Can you give us one or two examples of TAG property usage?

How can I set/get strings and arrays?

Thank you in advanced.
Here, about the string:

Code: Select all

'#Region "Form"
	#if defined(__FB_WIN32__) AndAlso defined(__FB_MAIN__)
		#cmdline "Form1.rc"
	#endif
	#include once "mff/Form.bi"
	#include once "mff/CommandButton.bi"
	
	Using My.Sys.Forms
	
	Type Form1Type Extends Form
		Declare Static Sub _cmdSetTextToTag_Click(ByRef Sender As Control)
		Declare Sub cmdSetTextToTag_Click(ByRef Sender As Control)
		Declare Static Sub _cmdGetTextFromTag_Click(ByRef Sender As Control)
		Declare Sub cmdGetTextFromTag_Click(ByRef Sender As Control)
		Declare Constructor
		
		Dim As CommandButton cmdSetTextToTag, cmdGetTextFromTag
	End Type
	
	Constructor Form1Type
		' Form1
		With This
			.Name = "Form1"
			.Text = "Form1"
			.Designer = @This
			.SetBounds 0, 0, 350, 300
		End With
		' cmdSetTextToTag
		With cmdSetTextToTag
			.Name = "cmdSetTextToTag"
			.Text = "Set text to Tag"
			.TabIndex = 0
			.Caption = "Set text to Tag"
			.SetBounds 94, 62, 156, 37
			.Designer = @This
			.OnClick = @_cmdSetTextToTag_Click
			.Parent = @This
		End With
		' cmdGetTextFromTag
		With cmdGetTextFromTag
			.Name = "cmdGetTextFromTag"
			.Text = "Get Text from Tag"
			.TabIndex = 1
			.Caption = "Get Text from Tag"
			.SetBounds 96, 141, 157, 40
			.Designer = @This
			.OnClick = @_cmdGetTextFromTag_Click
			.Parent = @This
		End With
	End Constructor
	
	Private Sub Form1Type._cmdGetTextFromTag_Click(ByRef Sender As Control)
		*Cast(Form1Type Ptr, Sender.Designer).cmdGetTextFromTag_Click(Sender)
	End Sub
	
	Private Sub Form1Type._cmdSetTextToTag_Click(ByRef Sender As Control)
		*Cast(Form1Type Ptr, Sender.Designer).cmdSetTextToTag_Click(Sender)
	End Sub
	
	Dim Shared Form1 As Form1Type
	
	#ifdef __FB_MAIN__
		Form1.Show
		
		App.Run
	#endif
'#End Region

Private Sub Form1Type.cmdSetTextToTag_Click(ByRef Sender As Control)
	Form1.Tag = @"My Text"
End Sub

Private Sub Form1Type.cmdGetTextFromTag_Click(ByRef Sender As Control)
	If Form1.Tag <> 0 Then
		MsgBox *Cast(WString Ptr, Form1.Tag)
	Else
		MsgBox "Tag is null"
	End If
End Sub
oyster wrote: Aug 30, 2022 4:19 too long and too many jargons.
can anyone give clear answers to these questions in normal human's sentences?
1. can user use MyFbFramework in commercial application without paying money for MyFbFramework, without needing to give the source code to anybody else
2. can user use his owen modified MyFbFramework without opening his modification
1. Yes, it can.
2. No, it needs to be opened.
flaviofornazier
Posts: 59
Joined: Oct 10, 2015 7:19
Location: Brazil

Re: VisualFBEditor - IDE for FreeBasic

Post by flaviofornazier »

Xusinboy Bekchanov wrote: Aug 30, 2022 5:36
flaviofornazier wrote: Aug 30, 2022 4:16 Mr.Bekchanov,

Can you give us one or two examples of TAG property usage?

How can I set/get strings and arrays?

Thank you in advanced.
Here, about the string:

Code: Select all

'#Region "Form"
	#if defined(__FB_WIN32__) AndAlso defined(__FB_MAIN__)
		#cmdline "Form1.rc"
	#endif
	#include once "mff/Form.bi"
	#include once "mff/CommandButton.bi"
	
	Using My.Sys.Forms
	
	Type Form1Type Extends Form
		Declare Static Sub _cmdSetTextToTag_Click(ByRef Sender As Control)
		Declare Sub cmdSetTextToTag_Click(ByRef Sender As Control)
		Declare Static Sub _cmdGetTextFromTag_Click(ByRef Sender As Control)
		Declare Sub cmdGetTextFromTag_Click(ByRef Sender As Control)
		Declare Constructor
		
		Dim As CommandButton cmdSetTextToTag, cmdGetTextFromTag
	End Type
	
	Constructor Form1Type
		' Form1
		With This
			.Name = "Form1"
			.Text = "Form1"
			.Designer = @This
			.SetBounds 0, 0, 350, 300
		End With
		' cmdSetTextToTag
		With cmdSetTextToTag
			.Name = "cmdSetTextToTag"
			.Text = "Set text to Tag"
			.TabIndex = 0
			.Caption = "Set text to Tag"
			.SetBounds 94, 62, 156, 37
			.Designer = @This
			.OnClick = @_cmdSetTextToTag_Click
			.Parent = @This
		End With
		' cmdGetTextFromTag
		With cmdGetTextFromTag
			.Name = "cmdGetTextFromTag"
			.Text = "Get Text from Tag"
			.TabIndex = 1
			.Caption = "Get Text from Tag"
			.SetBounds 96, 141, 157, 40
			.Designer = @This
			.OnClick = @_cmdGetTextFromTag_Click
			.Parent = @This
		End With
	End Constructor
	
	Private Sub Form1Type._cmdGetTextFromTag_Click(ByRef Sender As Control)
		*Cast(Form1Type Ptr, Sender.Designer).cmdGetTextFromTag_Click(Sender)
	End Sub
	
	Private Sub Form1Type._cmdSetTextToTag_Click(ByRef Sender As Control)
		*Cast(Form1Type Ptr, Sender.Designer).cmdSetTextToTag_Click(Sender)
	End Sub
	
	Dim Shared Form1 As Form1Type
	
	#ifdef __FB_MAIN__
		Form1.Show
		
		App.Run
	#endif
'#End Region

Private Sub Form1Type.cmdSetTextToTag_Click(ByRef Sender As Control)
	Form1.Tag = @"My Text"
End Sub

Private Sub Form1Type.cmdGetTextFromTag_Click(ByRef Sender As Control)
	If Form1.Tag <> 0 Then
		MsgBox *Cast(WString Ptr, Form1.Tag)
	Else
		MsgBox "Tag is null"
	End If
End Sub
Thank you. Now I get it. :D
Xusinboy Bekchanov
Posts: 783
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

flaviofornazier wrote: Aug 30, 2022 4:16 Mr.Bekchanov,

Can you give us one or two examples of TAG property usage?

How can I set/get strings and arrays?

Thank you in advanced.
Here is for arrays:

Code: Select all

'#Region "Form"
	#if defined(__FB_WIN32__) AndAlso defined(__FB_MAIN__)
		#cmdline "Form1.rc"
	#endif
	#include once "mff/Form.bi"
	#include once "mff/CommandButton.bi"
	
	Using My.Sys.Forms
	
	Type Form1Type Extends Form
		Declare Static Sub _cmdSetArrayToTag_Click(ByRef Sender As Control)
		Declare Sub cmdSetArrayToTag_Click(ByRef Sender As Control)
		Declare Static Sub _cmdGetArrayFromTag_Click(ByRef Sender As Control)
		Declare Sub cmdGetArrayFromTag_Click(ByRef Sender As Control)
		Declare Static Sub _cmdDeleteArray_Click(ByRef Sender As Control)
		Declare Sub cmdDeleteArray_Click(ByRef Sender As Control)
		Declare Constructor
		
		Dim As CommandButton cmdSetArrayToTag, cmdGetArrayFromTag, cmdDeleteArray
	End Type
	
	Constructor Form1Type
		' Form1
		With This
			.Name = "Form1"
			.Text = "Form1"
			.Designer = @This
			.SetBounds 0, 0, 350, 300
		End With
		' cmdSetArrayToTag
		With cmdSetArrayToTag
			.Name = "cmdSetArrayToTag"
			.Text = "Set Array to Tag"
			.TabIndex = 0
			.Caption = "Set Array to Tag"
			.SetBounds 50, 26, 228, 51
			.Designer = @This
			.OnClick = @_cmdSetArrayToTag_Click
			.Parent = @This
		End With
		' cmdGetArrayFromTag
		With cmdGetArrayFromTag
			.Name = "cmdGetArrayFromTag"
			.Text = "Get Array from Tag"
			.TabIndex = 1
			.Caption = "Get Array from Tag"
			.SetBounds 52, 106, 227, 54
			.Designer = @This
			.OnClick = @_cmdGetArrayFromTag_Click
			.Parent = @This
		End With
		' cmdDeleteArray
		With cmdDeleteArray
			.Name = "cmdDeleteArray"
			.Text = "Delete Array"
			.TabIndex = 2
			.Caption = "Delete Array"
			.SetBounds 53, 186, 224, 48
			.Designer = @This
			.OnClick = @_cmdDeleteArray_Click
			.Parent = @This
		End With
	End Constructor
	
	Private Sub Form1Type._cmdDeleteArray_Click(ByRef Sender As Control)
		*Cast(Form1Type Ptr, Sender.Designer).cmdDeleteArray_Click(Sender)
	End Sub
	
	Private Sub Form1Type._cmdGetArrayFromTag_Click(ByRef Sender As Control)
		*Cast(Form1Type Ptr, Sender.Designer).cmdGetArrayFromTag_Click(Sender)
	End Sub
	
	Private Sub Form1Type._cmdSetArrayToTag_Click(ByRef Sender As Control)
		*Cast(Form1Type Ptr, Sender.Designer).cmdSetArrayToTag_Click(Sender)
	End Sub
	
	Dim Shared Form1 As Form1Type
	
	#ifdef __FB_MAIN__
		Form1.Show
		
		App.Run
	#endif
'#End Region

Type Array
	rs(Any, Any) As String
End Type

Private Sub Form1Type.cmdSetArrayToTag_Click(ByRef Sender As Control)
	If Form1.Tag <> 0 Then
		Delete Cast(Array Ptr, Form1.Tag)
	End If
	Dim As Array Ptr arr = New Array
	ReDim arr->rs(5, 5)
	arr->rs(0, 0) = "a"
	arr->rs(4, 3) = "b"
	Form1.Tag = arr
End Sub

Private Sub Form1Type.cmdGetArrayFromTag_Click(ByRef Sender As Control)
	Dim As Array Ptr arr = Form1.Tag
	If arr = 0 Then
		MsgBox "Array not setted to Form1 Tag"
		Exit Sub
	End If
	For i As Integer = 0 To UBound(arr->rs)
		For j As Integer = 0 To UBound(arr->rs, 2)
			Print i, j, arr->rs(i, j)
		Next
	Next
End Sub

Private Sub Form1Type.cmdDeleteArray_Click(ByRef Sender As Control)
	If Form1.Tag = 0 Then
		MsgBox "Array not setted to Form1 Tag"
		Exit Sub
	End If
	Delete Cast(Array Ptr, Form1.Tag)
	Form1.Tag = 0
End Sub
flaviofornazier
Posts: 59
Joined: Oct 10, 2015 7:19
Location: Brazil

Re: VisualFBEditor - IDE for FreeBasic

Post by flaviofornazier »

Xusinboy Bekchanov wrote: Aug 30, 2022 6:27
flaviofornazier wrote: Aug 30, 2022 4:16 Mr.Bekchanov,

Can you give us one or two examples of TAG property usage?

How can I set/get strings and arrays?

Thank you in advanced.
Here is for arrays:

Code: Select all

'#Region "Form"
	#if defined(__FB_WIN32__) AndAlso defined(__FB_MAIN__)
		#cmdline "Form1.rc"
	#endif
	#include once "mff/Form.bi"
	#include once "mff/CommandButton.bi"
	
	Using My.Sys.Forms
	
	Type Form1Type Extends Form
		Declare Static Sub _cmdSetArrayToTag_Click(ByRef Sender As Control)
		Declare Sub cmdSetArrayToTag_Click(ByRef Sender As Control)
		Declare Static Sub _cmdGetArrayFromTag_Click(ByRef Sender As Control)
		Declare Sub cmdGetArrayFromTag_Click(ByRef Sender As Control)
		Declare Static Sub _cmdDeleteArray_Click(ByRef Sender As Control)
		Declare Sub cmdDeleteArray_Click(ByRef Sender As Control)
		Declare Constructor
		
		Dim As CommandButton cmdSetArrayToTag, cmdGetArrayFromTag, cmdDeleteArray
	End Type
	
	Constructor Form1Type
		' Form1
		With This
			.Name = "Form1"
			.Text = "Form1"
			.Designer = @This
			.SetBounds 0, 0, 350, 300
		End With
		' cmdSetArrayToTag
		With cmdSetArrayToTag
			.Name = "cmdSetArrayToTag"
			.Text = "Set Array to Tag"
			.TabIndex = 0
			.Caption = "Set Array to Tag"
			.SetBounds 50, 26, 228, 51
			.Designer = @This
			.OnClick = @_cmdSetArrayToTag_Click
			.Parent = @This
		End With
		' cmdGetArrayFromTag
		With cmdGetArrayFromTag
			.Name = "cmdGetArrayFromTag"
			.Text = "Get Array from Tag"
			.TabIndex = 1
			.Caption = "Get Array from Tag"
			.SetBounds 52, 106, 227, 54
			.Designer = @This
			.OnClick = @_cmdGetArrayFromTag_Click
			.Parent = @This
		End With
		' cmdDeleteArray
		With cmdDeleteArray
			.Name = "cmdDeleteArray"
			.Text = "Delete Array"
			.TabIndex = 2
			.Caption = "Delete Array"
			.SetBounds 53, 186, 224, 48
			.Designer = @This
			.OnClick = @_cmdDeleteArray_Click
			.Parent = @This
		End With
	End Constructor
	
	Private Sub Form1Type._cmdDeleteArray_Click(ByRef Sender As Control)
		*Cast(Form1Type Ptr, Sender.Designer).cmdDeleteArray_Click(Sender)
	End Sub
	
	Private Sub Form1Type._cmdGetArrayFromTag_Click(ByRef Sender As Control)
		*Cast(Form1Type Ptr, Sender.Designer).cmdGetArrayFromTag_Click(Sender)
	End Sub
	
	Private Sub Form1Type._cmdSetArrayToTag_Click(ByRef Sender As Control)
		*Cast(Form1Type Ptr, Sender.Designer).cmdSetArrayToTag_Click(Sender)
	End Sub
	
	Dim Shared Form1 As Form1Type
	
	#ifdef __FB_MAIN__
		Form1.Show
		
		App.Run
	#endif
'#End Region

Type Array
	rs(Any, Any) As String
End Type

Private Sub Form1Type.cmdSetArrayToTag_Click(ByRef Sender As Control)
	If Form1.Tag <> 0 Then
		Delete Cast(Array Ptr, Form1.Tag)
	End If
	Dim As Array Ptr arr = New Array
	ReDim arr->rs(5, 5)
	arr->rs(0, 0) = "a"
	arr->rs(4, 3) = "b"
	Form1.Tag = arr
End Sub

Private Sub Form1Type.cmdGetArrayFromTag_Click(ByRef Sender As Control)
	Dim As Array Ptr arr = Form1.Tag
	If arr = 0 Then
		MsgBox "Array not setted to Form1 Tag"
		Exit Sub
	End If
	For i As Integer = 0 To UBound(arr->rs)
		For j As Integer = 0 To UBound(arr->rs, 2)
			Print i, j, arr->rs(i, j)
		Next
	Next
End Sub

Private Sub Form1Type.cmdDeleteArray_Click(ByRef Sender As Control)
	If Form1.Tag = 0 Then
		MsgBox "Array not setted to Form1 Tag"
		Exit Sub
	End If
	Delete Cast(Array Ptr, Form1.Tag)
	Form1.Tag = 0
End Sub
Thank you. Now the issue was completely explained and documented.
Avata
Posts: 102
Joined: Jan 17, 2021 7:27

Re: VisualFBEditor - IDE for FreeBasic

Post by Avata »

Cool! It is a visual design IDE indeed now. The IDE could showing the menu items and toolBar in designn mode.

Image
Avata
Posts: 102
Joined: Jan 17, 2021 7:27

Re: VisualFBEditor - IDE for FreeBasic

Post by Avata »

A nice examples about MDI forms and showing the usage of control menu, toolbar, SaveFileDialog,OpenDialog, ColorDialog, FontDialog, ImageList....
And the cool dark mode.

Download the ource code from "Examples\MDINotepad"
https://github.com/XusinboyBekchanov/VisualFBEditor https://github.com/XusinboyBekchanov/V ... r/pull/378

Image
Last edited by Avata on Sep 08, 2022 14:12, edited 1 time in total.
Avata
Posts: 102
Joined: Jan 17, 2021 7:27

Re: VisualFBEditor - IDE for FreeBasic

Post by Avata »

I will try import the frame IUP and FLTK-C. I wish it is not too difficult.
Xusinboy Bekchanov
Posts: 783
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

Avata wrote: Sep 08, 2022 14:11 I will try import the frame IUP and FLTK-C. I wish it is not too difficult.
A good idea.
Avata
Posts: 102
Joined: Jan 17, 2021 7:27

Re: VisualFBEditor - IDE for FreeBasic

Post by Avata »

Yes. Just import the code and can compile without any issue. The FLTK has a visual design tools.
Xusinboy Bekchanov
Posts: 783
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

Avata wrote: Sep 10, 2022 16:35 Yes. Just import the code and can compile without any issue. The FLTK has a visual design tools.
Then what import I did not understand.
Avata
Posts: 102
Joined: Jan 17, 2021 7:27

Re: VisualFBEditor - IDE for FreeBasic

Post by Avata »

Just compile the source code as normal project. It is difficult do a visual design.
Xusinboy Bekchanov
Posts: 783
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

Avata wrote: Sep 16, 2022 9:27 Just compile the source code as normal project. It is difficult do a visual design.
You can submit a pull request as a Project template.
Post Reply