VisualFBEditor - IDE for FreeBasic

User projects written in or related to FreeBASIC.
Post Reply
flaviofornazier
Posts: 59
Joined: Oct 10, 2015 7:19
Location: Brazil

Re: VisualFBEditor - IDE for FreeBasic

Post by flaviofornazier »

Xusinboy Bekchanov wrote: Aug 14, 2022 4:26
flaviofornazier wrote: Aug 13, 2022 22:12 Hi Mr.Bekchanov,

Methods RsFind, SQLString and ErrorOut... My apologies, I guess you're right, it seems EXEC method is just for SQL commands that not require a result set. Later I will explain you why I'm struggling with... it's not for me...
Added: OnSQLString function event and OnErrorOut sub event to SQLite3Component.
Added: Ability to process function events in the IDE.

The original name was FindRs, in the latest version it has been removed, I think, as a recurring SQLString event.
flaviofornazier wrote: Aug 13, 2022 22:12 No text after. Any code runs with no issues but 109 should be my lucky number. It's happening on all my x86/64 Windows versions, except if I check "Console" instead of GUI before run any project from IDE. Strange... The installation procedure is the same, Windows, Powershell, Curl are up to date...

Thank you in advanced.
Fixed: Return of error ERROR_BROKEN_PIPE (109) when closing started without a console program.

It simply means that after the program terminates (pipe closed) the process can no longer read. I removed this return code.

https://github.com/XusinboyBekchanov/Vi ... 093a402ec6
Mr.Bekchanov,

Error 109 has been successfully fixed.

About the SQLite component, it seems that the code of the 2 events are inverted, so when I close
the form I receive errors "Null Pointer Access" and after "Segmentation violation signal"

But please take your time, you must be really tired!

Thank you for your efforts.
Xusinboy Bekchanov
Posts: 789
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

flaviofornazier wrote: Aug 14, 2022 5:44 Mr.Bekchanov,

Error 109 has been successfully fixed.

About the SQLite component, it seems that the code of the 2 events are inverted, so when I close
the form I receive errors "Null Pointer Access" and after "Segmentation violation signal"

But please take your time, you must be really tired!

Thank you for your efforts.
What code do you have? This didn't happen to me.
flaviofornazier
Posts: 59
Joined: Oct 10, 2015 7:19
Location: Brazil

Re: VisualFBEditor - IDE for FreeBasic

Post by flaviofornazier »

Xusinboy Bekchanov wrote: Aug 14, 2022 6:52
flaviofornazier wrote: Aug 14, 2022 5:44 Mr.Bekchanov,

Error 109 has been successfully fixed.

About the SQLite component, it seems that the code of the 2 events are inverted, so when I close
the form I receive errors "Null Pointer Access" and after "Segmentation violation signal"

But please take your time, you must be really tired!

Thank you for your efforts.
What code do you have? This didn't happen to me.
Well, In event "ErrorOut" I'm receiving data destined to event "SQLString" and vice versa.
Xusinboy Bekchanov
Posts: 789
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

flaviofornazier wrote: Aug 14, 2022 7:04
Xusinboy Bekchanov wrote: Aug 14, 2022 6:52
flaviofornazier wrote: Aug 14, 2022 5:44 Mr.Bekchanov,

Error 109 has been successfully fixed.

About the SQLite component, it seems that the code of the 2 events are inverted, so when I close
the form I receive errors "Null Pointer Access" and after "Segmentation violation signal"

But please take your time, you must be really tired!

Thank you for your efforts.
What code do you have? This didn't happen to me.
Well, In event "ErrorOut" I'm receiving data destined to event "SQLString" and vice versa.
Here I have swapped:
https://github.com/XusinboyBekchanov/Vi ... ad6d761afe
Xusinboy Bekchanov
Posts: 789
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

marcov wrote: Aug 13, 2022 9:26 It is more an exception to the LGPL than a standalone license. We simply have a file COPYING.FPC next to the LGPL COPYING file that says
This is the file COPYING.FPC, it applies to the Free Pascal Run-Time Library
(RTL) and packages (packages) distributed by members of the Free Pascal
Development Team.

The source code of the Free Pascal Runtime Libraries and packages are
distributed under the Library GNU General Public License
(see the file COPYING) with the following modification:

As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent modules,
and to copy and distribute the resulting executable under terms of your choice,
provided that you also meet, for each linked independent module, the terms
and conditions of the license of that module. An independent module is a module
which is not derived from or based on this library. If you modify this
library, you may extend this exception to your version of the library, but you are
not obligated to do so. If you do not wish to do so, delete this exception
statement from your version.

If you didn't receive a copy of the file COPYING, contact:
Free Software Foundation
675 Mass Ave
Cambridge, MA 02139
USA
Thanks.
flaviofornazier
Posts: 59
Joined: Oct 10, 2015 7:19
Location: Brazil

Re: VisualFBEditor - IDE for FreeBasic

Post by flaviofornazier »

Xusinboy Bekchanov wrote: Aug 14, 2022 7:37
flaviofornazier wrote: Aug 14, 2022 7:04
Xusinboy Bekchanov wrote: Aug 14, 2022 6:52
What code do you have? This didn't happen to me.
Well, In event "ErrorOut" I'm receiving data destined to event "SQLString" and vice versa.
Here I have swapped:
https://github.com/XusinboyBekchanov/Vi ... ad6d761afe
Hi Mr.Bekchanov,

SQLite Component events has been successfully fixed.

Thank you very much.
Avata
Posts: 102
Joined: Jan 17, 2021 7:27

Re: VisualFBEditor - IDE for FreeBasic

Post by Avata »

flaviofornazier wrote: Aug 15, 2022 4:34
Hi Mr.Bekchanov,

SQLite Component events has been successfully fixed.

Thank you very much.
It is better post the test code and someone could run it and maybe improve it.

Like the MDIForm testing

MDIForm.VBP

Code: Select all

File=Form2.frm
*File=MDIForm.frm
File=Form1.rc
ProjectType=0
Subsystem=2
ProjectName=""
HelpFileName=""
ProjectDescription=""
PassAllModuleFilesToCompiler=false
MajorVersion=0
MinorVersion=0
RevisionVersion=0
BuildVersion=96
AutoIncrementVersion=false
ApplicationTitle=""
ApplicationIcon=""
Manifest=true
RunAsAdministrator=false
CompanyName=""
FileDescription="{ProjectDescription}"
InternalName=""
LegalCopyright=""
LegalTrademarks=""
OriginalFilename=""
ProductName="{ProjectName}"
CompileTo=0
OptimizationLevel=0
OptimizationFastCode=false
OptimizationSmallCode=false
CompilationArguments32Windows=""
CompilationArguments64Windows=""
CompilationArguments32Linux=""
CompilationArguments64Linux=""
CompilerPath=""
CommandLineArguments=""
CreateDebugInfo=false
AndroidSDKLocation=""
AndroidNDKLocation=""
JDKLocation=""

MDIForm.frm

Code: Select all

#ifdef __FB_WIN32__
	#cmdline "Form1.rc"
#endif
'#Region "Form"
	#include once "mff/Form.bi"
	#include once "mff/Menus.bi"
	#include once "mff/ReBar.bi"
	#include once "mff/ImageList.bi"
	
	Using My.Sys.Forms
	
	Type MDIFormType Extends Form
		Declare Static Sub _mnuFileOpen_Click(ByRef Sender As MenuItem)
		Declare Sub mnuFileOpen_Click(ByRef Sender As MenuItem)
		Declare Static Sub _mnuEditCopy_Click(ByRef Sender As MenuItem)
		Declare Sub mnuEditCopy_Click(ByRef Sender As MenuItem)
		Declare Static Sub _mnuEditCut_Click(ByRef Sender As MenuItem)
		Declare Sub mnuEditCut_Click(ByRef Sender As MenuItem)
		Declare Static Sub _mnuFileExit_Click(ByRef Sender As MenuItem)
		Declare Sub mnuFileExit_Click(ByRef Sender As MenuItem)
		Declare Static Sub _mnuFileNew_Click(ByRef Sender As MenuItem)
		Declare Sub mnuFileNew_Click(ByRef Sender As MenuItem)
		Declare Constructor
		
		Dim As MainMenu MainMenu1
		Dim As MenuItem mnuFile, mnuFileNew, mnuFileOpen, mnuFileSave, mnuFileSaveAs, mnuFileBar1, mnuFileBar2, mnuFileClose, mnuFileSaveAll, mnuFileBar3, mnuFileProperties, mnuFilePrintSetup, mnuFilePrintPreview, mnuFilePrint, mnuFileBar4, mnuFileSend, mnuFileBar5, mnuFileExit
		Dim As MenuItem mnuEdit, mnuEditUndo, mnuRedo, mnuEditCopy, mnuEditCut, mnuEditPaste, mnuEditBar1, mnuEditPasteSpecial, mnuEditBar2, mnuEditDSelectAll, mnuEditInvertSelection
		Dim As MenuItem mnuView, mnuViewToolbar, mnuViewStatusBar, mnuViewBar1, mnuViewLargeIcons, mnuViewSmallIcons, mnuViewList, mnuViewDetails, mnuViewBar2, mnuViewArrangeIcons, mnuVAIByName, mnuVAIByType, mnuVAIBySize, mnuVAIByDate, mnuViewLineUpIcons, mnuViewBar3, mnuViewRefresh , mnuViewOptions
		Dim As MenuItem mnuHelp, mnuHelpContent, mnuHelpAbout, mnuHelpSearch, mnuHelpBar1
		Dim As MenuItem mnuWindow, mnuWindowNewWindow, mnuWindowCascade, mnuWindowTileHorizontal, mnuWindowTileVertical, mnuWindowArrangeIcons, mnuWindowBar1
		Dim As ReBar ReBar1
		Dim As ImageList ImageList1
	End Type
	
	Constructor MDIFormType
		' MDIForm
		With This
			.Name = "MDIForm"
			.Text = "MDIMain"
			.Designer = @This
			.Menu = @MainMenu1
			.FormStyle = FormStyles.fsMDIForm
			#ifdef __USE_GTK__
				This.Icon.LoadFromFile(ExePath & "VisualFBEditor.ico")
			#else
				This.Icon.LoadFromResourceID(1)
			#endif
			'.WindowState = WindowStates.wsMaximized
			.Caption = "MDIMain"
			.SetBounds 0, 0, 350, 319
		End With
		' ImageList1
		With ImageList1
			.Name = "ImageList1"
			.ImageWidth = 16
			.ImageHeight = 16
			.SetBounds 116, 70, 16, 16
			.Designer = @This
			.Add "New ", "New"
			.Add "About", "About"
			.Add "Cut", " Cut"
			.Add "Exit", "Exit"
			.Add "File", "File"
			.Add "Open", "Open"
			.Add "Paste", "Paste"
			.Add "Save", "Save"
			.Add "SaveAll", "SaveAll"
			.Parent = @This
		End With
		' MainMenu1
		With MainMenu1
			.Name = "MainMenu1"
			.SetBounds 81, 69, 16, 16
			.Designer = @This
			.Parent = @This
		End With
		' mnuFile
		With mnuFile
			.Name = "mnuFile"
			.Designer = @This
			.Caption = "&File"
			.ParentMenu = @MainMenu1
		End With
		' mnuFileNew
		With mnuFileNew
			.Name = "mnuFileNew"
			.Designer = @This
			.Caption = "&New" & !"\tCtrl+N"
			.ImageKey = "New"
			.onClick = @_mnuFileNew_Click
			.Parent = @mnuFile
		End With
		' mnuFileOpen
		With mnuFileOpen
			.Name = "mnuFileOpen"
			.Designer = @This
			.Caption = "&Open" & !"\tCtrl+O"
			.ImageKey = "Open"
			.onClick = @_mnuFileOpen_Click
			.Parent = @mnuFile
		End With
		' mnuFileClose
		With mnuFileClose
			.Name = "mnuFileClose"
			.Designer = @This
			.Caption = "&Close"
			.Parent = @mnuFile
		End With
		' mnuFileBar1
		With mnuFileBar1
			.Name = "mnuFileBar1"
			.Designer = @This
			.Caption = "-"
			.Parent = @mnuFile
		End With
		' mnuFileSave
		With mnuFileSave
			.Name = "mnuFileSave"
			.Designer = @This
			.Caption = "Save"  & !"\tCtrl+S"
			.ImageKey = "Save"
			.Parent = @mnuFile
		End With
		' mnuFileSaveAs
		With mnuFileSaveAs
			.Name = "mnuFileSaveAs"
			.Designer = @This
			.Caption = "Save &As..."
			.ImageKey = "SaveAs"
			.Parent = @mnuFile
		End With
		' mnuFileSaveAll
		With mnuFileSaveAll
			.Name = "mnuFileSaveAll"
			.Designer = @This
			.Caption = "Save A&ll"
			.Parent = @mnuFile
		End With
		' mnuFileBar2
		With mnuFileBar2
			.Name = "mnuFileBar2"
			.Designer = @This
			.Caption = "-"
			.Parent = @mnuFile
		End With
		' mnuFileProperties
		With mnuFileProperties
			.Name = "mnuFileProperties"
			.Designer = @This
			.Caption = "Propert&ies"
			.Parent = @mnuFile
		End With
		' mnuFileBar3
		With mnuFileBar3
			.Name = "mnuFileBar3"
			.Designer = @This
			.Caption = "-"
			.Parent = @mnuFile
		End With
		' mnuFilePrintSetup
		With mnuFilePrintSetup
			.Name = "mnuFilePrintSetup"
			.Designer = @This
			.Caption = "Print Set&up..."
			.Parent = @mnuFile
		End With
		' mnuFilePrintPreview
		With mnuFilePrintPreview
			.Name = "mnuFilePrintPreview"
			.Designer = @This
			.Caption = "Print Pre&view"
			.MenuIndex = 11
			.Parent = @mnuFile
		End With
		' mnuFilePrint
		With mnuFilePrint
			.Name = "mnuFilePrint"
			.Designer = @This
			.Caption = "&Print..." & !"\tCtrl+P"
			.Parent = @mnuFile
		End With
		' mnuFileBar4
		With mnuFileBar4
			.Name = "mnuFileBar4"
			.Designer = @This
			.Caption = "-"
			.Parent = @mnuFile
		End With
		' mnuFileSend
		With mnuFileSend
			.Name = "mnuFileSend"
			.Designer = @This
			.Caption = "Sen&d..."
			.Parent = @mnuFile
		End With
		' mnuFileBar5
		With mnuFileBar5
			.Name = "mnuFileBar5"
			.Designer = @This
			.Caption = "-"
			.Parent = @mnuFile
		End With
		' mnuFileExit
		With mnuFileExit
			.Name = "mnuFileExit"
			.Designer = @This
			.Caption = "E&xit"
			.ImageKey = "Exit"
			.onClick = @_mnuFileExit_Click
			.Parent = @mnuFile
		End With
		' mnuEdit
		With mnuEdit
			.Name = "mnuEdit"
			.Designer = @This
			.Caption = "&Edit"
			.ParentMenu = @MainMenu1
		End With
		' mnuRedo
		With mnuRedo
			.Name = "mnuRedo"
			.Designer = @This
			.Caption = "&Redo"
			.Parent = @mnuEdit
		End With
		' mnuEditUndo
		With mnuEditUndo
			.Name = "mnuEditUndo"
			.Designer = @This
			.Caption = "&Undo"
			.Parent = @mnuEdit
		End With
		' mnuEditBar1
		With mnuEditBar1
			.Name = "mnuEditBar1"
			.Designer = @This
			.Caption = "-"
			.Parent = @mnuEdit
		End With
		With mnuEditCut
			.Name = "mnuEditCut"
			.Designer = @This
			.Caption = "Cu&t"
			.ImageKey = "Cut"
			.onClick = @_mnuEditCut_Click
			.Parent =  @mnuEdit
		End With
		' mnuEditCopy
		With mnuEditCopy
			.Name = "mnuEditCopy"
			.Designer = @This
			.Caption = "&Copy"
			.ImageKey = "Copy"
			.onClick = @_mnuEditCopy_Click
			.Parent = @mnuEdit
		End With
		' mnuEditPaste
		With mnuEditPaste
			.Name = "mnuEditPaste"
			.Designer = @This
			.Caption = "&Paste"
			.ImageKey = "Paste"
			.Parent = @mnuEdit
		End With
		' mnuEditPasteSpecial
		With mnuEditPasteSpecial
			.Name = "mnuEditPasteSpecial"
			.Designer = @This
			.Caption = "Paste &Special..."
			.Parent = @mnuEdit
		End With
		' mnuEditBar2
		With mnuEditBar2
			.Name = "mnuEditBar2"
			.Designer = @This
			.Caption = "-"
			.Parent = @mnuEdit
		End With
		' mnuEditDSelectAll
		With mnuEditDSelectAll
			.Name = "mnuEditDSelectAll"
			.Designer = @This
			.Caption = "Select &All"
			.Parent = @mnuEdit
		End With
		' mnuEditInvertSelection
		With mnuEditInvertSelection
			.Name = "mnuEditInvertSelection"
			.Designer = @This
			.Caption = "&Invert Selection"
			.Parent = @mnuEdit
		End With
		' mnuView
		With mnuView
			.Name = "mnuView"
			.Designer = @This
			.Caption = "&View"
			.ParentMenu = @MainMenu1
		End With
		With mnuViewToolbar
			.Name = "mnuViewToolbar"
			.Caption         =   "&Toolbar"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewStatusBar
			.Name = "mnuViewStatusBar"
			.Caption         =   "Status &Bar"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewBar1
			.Name = "mnuViewBar1"
			.Caption         =   "-"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewLargeIcons
			.Name = "mnuViewLargeIcons"
			.Caption         =   "Lar&ge Icons"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewSmallIcons
			.Name = "mnuViewSmallIcons"
			.Caption         =   "S&mall Icons"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewList
			.Name = "mnuViewList"
			.Caption         =   "&List"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewDetails
			.Name = "mnuViewDetails"
			.Caption         =   "&Details"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewBar2
			.Name = "mnuViewBar2"
			.Caption         =   "-"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewArrangeIcons
			.Name = "mnuViewArrangeIcons"
			.Caption         =   "Arrange &Icons"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuVAIByName
			.Name = "mnuVAIByName"
			.Caption         =   "by &Name"
			.Designer = @This
			.Parent = @mnuViewArrangeIcons
		End With
		With mnuVAIByType
			.Name = "mnuVAIByType"
			.Caption         =   "by &Type"
			.Designer = @This
			.Parent = @mnuViewArrangeIcons
		End With
		With mnuVAIBySize
			.Name = "mnuVAIBySize"
			.Caption         =   "by Si&ze"
			.Designer = @This
			.Parent = @mnuViewArrangeIcons
		End With
		With mnuVAIByDate
			.Name = "mnuVAIByDate"
			.Caption         =   "by &Date"
			.Designer = @This
			.Parent = @mnuViewArrangeIcons
		End With
		With mnuViewLineUpIcons
			.Name = "mnuViewLineUpIcons"
			.Caption         =   "Li&ne Up Icons"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewBar3
			.Name = "mnuViewBar3"
			.Caption         =   "-"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewRefresh
			.Name = "mnuViewRefresh"
			.Caption         =   "&Refresh"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewOptions
			.Name = "mnuViewOptions"
			.Caption         =   "&Options..."
			.Designer = @This
			.Parent = @mnuView
		End With
		
		With mnuWindow
			.Name = "mnuWindow"
			.Caption         =   "&Window"
			.Designer = @This
			.Parent = @MainMenu1
		End With
		With mnuWindowNewWindow
			.Name = "mnuWindowNewWindow"
			.Caption         =   "&New Window"
			.Designer = @This
			.Parent = @mnuWindow
		End With
		With mnuWindowCascade
			.Caption         =   "&Cascade"
			.Designer = @This
			.Parent = @mnuWindow
		End With
		With mnuWindowTileHorizontal
			.Name = "mnuWindowTileHorizontal"
			.Caption         =   "Tile &Horizontal"
			.Designer = @This
			.Parent = @mnuWindow
		End With
		With mnuWindowTileVertical
			.Name = "mnuWindowTileVertical"
			.Caption         =   "Tile &Vertical"
			.Designer = @This
			.Parent = @mnuWindow
		End With
		With mnuWindowArrangeIcons
			.Name= "mnuWindowArrangeIcons"
			.Caption         =   "&Arrange Icons"
			.Designer = @This
			.Parent = @mnuWindow
		End With
		With mnuWindowBar1
			.Name= "mnuWindowBar1"
			.Caption         =   "-"
			.Designer = @This
			.Parent = @mnuWindow
		End With
		' mnuHelp
		With mnuHelp
			.Name = "mnuHelp"
			.Designer = @This
			.Caption = "&Help"
			.ParentMenu = @MainMenu1
		End With
		' mnuHelpContent
		With mnuHelpContent
			.Name = "mnuHelpContent"
			.Designer = @This
			.Caption = "&Contents"
			.Parent = @mnuHelp
		End With
		' mnuHelpSearch
		With mnuHelpSearch
			.Name = "mnuHelpSearch"
			.Designer = @This
			.Caption = "&Search For Help On..."
			.Parent = @mnuHelp
		End With
		' mnuHelpBar1
		With mnuHelpBar1
			.Name = "mnuHelpBar1"
			.Designer = @This
			.Caption = "-"
			.Parent = @mnuHelp
		End With
		' mnuHelpAbout
		With mnuHelpAbout
			.Name = "mnuHelpAbout"
			.Designer = @This
			.Caption = "About"
			.ImageKey = "About"
			.Parent = @mnuHelp
		End With
		' ReBar1
		With ReBar1
			.Name = "ReBar1"
			.Text = "ReBar1"
			.SetBounds 6, 4, 324, 18
			.Designer = @This
			.Parent = @This
		End With
		
	End Constructor
	
	Private Sub MDIFormType._mnuFileNew_Click(ByRef Sender As MenuItem)
		*Cast(MDIFormType Ptr, Sender.Designer).mnuFileNew_Click(Sender)
	End Sub
	
	Private Sub MDIFormType._mnuFileExit_Click(ByRef Sender As MenuItem)
		*Cast(MDIFormType Ptr, Sender.Designer).mnuFileExit_Click(Sender)
	End Sub
	
	Private Sub MDIFormType._mnuEditCut_Click(ByRef Sender As MenuItem)
		*Cast(MDIFormType Ptr, Sender.Designer).mnuEditCut_Click(Sender)
	End Sub
	
	Private Sub MDIFormType._mnuEditCopy_Click(ByRef Sender As MenuItem)
		*Cast(MDIFormType Ptr, Sender.Designer).mnuEditCopy_Click(Sender)
	End Sub
	
	Private Sub MDIFormType._mnuFileOpen_Click(ByRef Sender As MenuItem)
		*Cast(MDIFormType Ptr, Sender.Designer).mnuFileOpen_Click(Sender)
	End Sub
	
	Dim Shared MDIForm As MDIFormType
	
	#ifndef _NOT_AUTORUN_FORMS_
		#define _NOT_AUTORUN_FORMS_
		
		MDIForm.Show
		
		App.Run
	#endif
'#End Region

#include once "Form2.frm"

Private Sub MDIFormType.mnuFileOpen_Click(ByRef Sender As MenuItem)
	Form2.Show MDIForm
End Sub

Private Sub MDIFormType.mnuEditCopy_Click(ByRef Sender As MenuItem)
	MsgBox "Place Copy Code here!"
End Sub

Private Sub MDIFormType.mnuEditCut_Click(ByRef Sender As MenuItem)
	MsgBox "Place Cut Code here!"
End Sub

Private Sub MDIFormType.mnuFileExit_Click(ByRef Sender As MenuItem)
	This.ModalResult = ModalResults.OK
	This.CloseForm
End Sub

Private Sub MDIFormType.mnuFileNew_Click(ByRef Sender As MenuItem)
	MsgBox "Place New Code here!"
End Sub
form2.frm

Code: Select all

#ifdef __FB_WIN32__
	#cmdline "Form1.rc"
#endif
'#Region "Form"
	#include once "mff/Form.bi"
	#include once "mff/CommandButton.bi"
	#include once "mff/ImageList.bi"
	
	Using My.Sys.Forms
	
	Type Form2Type Extends Form
		Declare Static Sub _CommandButton1_Click(ByRef Sender As Control)
		Declare Sub CommandButton1_Click(ByRef Sender As Control)
		Declare Static Sub _Form_Click(ByRef Sender As Control)
		Declare Sub Form_Click(ByRef Sender As Control)
		Declare Static Sub _CommandButton1_KeyPress(ByRef Sender As Control, Key As Integer)
		Declare Sub CommandButton1_KeyPress(ByRef Sender As Control, Key As Integer)
		Declare Static Sub _CommandButton1_KeyUp(ByRef Sender As Control, Key As Integer, Shift As Integer)
		Declare Sub CommandButton1_KeyUp(ByRef Sender As Control, Key As Integer, Shift As Integer)
		Declare Constructor
		
		Dim As CommandButton CommandButton1
		Dim As ImageList ImageList1
	End Type
	
	Constructor Form2Type
		' Form2
		With This
			.Name = "Form2"
			.Text = "Form2"
			.FormStyle = FormStyles.fsMDIChild
			#ifdef __USE_GTK__
				This.Icon.LoadFromFile(ExePath & "VisualFBEditor.ico")
			#else
				This.Icon.LoadFromResourceID(1)
			#endif
			.Designer = @This
			.onClick = @_Form_Click
			.SetBounds 0, 0, 350, 300
		End With
		' CommandButton1
		With CommandButton1
			.Name = "CommandButton1"
			.Text = "CommandButton1"
			.TabIndex = 0
			.SetBounds 83, 220, 133, 29
			.Designer = @This
			.OnClick = @_CommandButton1_Click
			.OnKeyPress = @_CommandButton1_KeyPress
			.OnKeyUp = @_CommandButton1_KeyUp
			.Parent = @This
		End With
		' ImageList1
		With ImageList1
			.Name = "ImageList1"
			.SetBounds 141, 104, 16, 16
			.Designer = @This
			.Parent = @This
		End With
	End Constructor
	
	Private Sub Form2Type._CommandButton1_KeyUp(ByRef Sender As Control, Key As Integer, Shift As Integer)
		*Cast(Form2Type Ptr, Sender.Designer).CommandButton1_KeyUp(Sender, Key, Shift)
	End Sub
	
	Private Sub Form2Type._CommandButton1_KeyPress(ByRef Sender As Control, Key As Integer)
		*Cast(Form2Type Ptr, Sender.Designer).CommandButton1_KeyPress(Sender, Key)
	End Sub
	
	Private Sub Form2Type._Form_Click(ByRef Sender As Control)
		*Cast(Form2Type Ptr, Sender.Designer).Form_Click(Sender)
	End Sub
	
	Private Sub Form2Type._CommandButton1_Click(ByRef Sender As Control)
		*Cast(Form2Type Ptr, Sender.Designer).CommandButton1_Click(Sender)
	End Sub
	
	Dim Shared Form2 As Form2Type
	
	#ifndef _NOT_AUTORUN_FORMS_
		#define _NOT_AUTORUN_FORMS_
		
		Form2.Show
		
		App.Run
	#endif
'#End Region

'#include once "Form3.frm"

Private Sub Form2Type.CommandButton1_Click(ByRef Sender As Control)
	'Form3.Show MDIForm
End Sub

Private Sub Form2Type.Form_Click(ByRef Sender As Control)
	MsgBox "This is form2"
	'Form3.Show MDIForm
End Sub

Private Sub Form2Type.CommandButton1_KeyPress(ByRef Sender As Control, Key As Integer)
	
End Sub

Private Sub Form2Type.CommandButton1_KeyUp(ByRef Sender As Control, Key As Integer, Shift As Integer)
	
End Sub
Form1.rc

Code: Select all

1 24 "Manifest.xml"
1 ICON "VisualFBEditor.ico"
New PNG ".\Resources\New.png"
About PNG ".\Resources\About.png"
Cut PNG ".\Resources\Cut.png"
Exit PNG ".\Resources\Exit.png"
File PNG ".\Resources\File.png"
Open PNG ".\Resources\Open.png"
Paste PNG ".\Resources\Paste.png"
Save PNG ".\Resources\Save.png"
SaveAll PNG ".\Resources\SaveAll.png"

#define APP_TITLE_STR               "\0"
#define VER_FILEDESCRIPTION_STR     "\0"

#define VER_FILEVERSION             0,0,0,106
#define VER_FILEVERSION_STR         "0.0.0.106\0"

#define VER_LEGALCOPYRIGHT_STR      "\0"

#define VER_INTERNALNAME_STR        "\0"
#define VER_ORIGINALFILENAME_STR    "\0"
#define VER_PRODUCTNAME_STR         "\0"

#define VER_PRODUCTVERSION          0,0,0,0
#define VER_PRODUCTVERSION_STR      "0.0.0\0"
#define VER_COMPANYNAME_STR         "\0"

VS_VERSION_INFO VERSIONINFO
FILEVERSION     VER_FILEVERSION
PRODUCTVERSION  VER_PRODUCTVERSION
FILEOS          VOS__WINDOWS32
FILETYPE        VFT_APP
FILESUBTYPE     VFT2_UNKNOWN
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904E4"
        BEGIN
        	VALUE "ApplicationTitle", APP_TITLE_STR
            VALUE "FileDescription",  VER_FILEDESCRIPTION_STR
            VALUE "FileVersion",      VER_FILEVERSION_STR
            VALUE "InternalName",     VER_INTERNALNAME_STR
            VALUE "LegalCopyright",   VER_LEGALCOPYRIGHT_STR
            VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR
            VALUE "ProductName",      VER_PRODUCTNAME_STR
            VALUE "ProductVersion",   VER_PRODUCTVERSION_STR
            VALUE "CompanyName",      VER_COMPANYNAME_STR
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        /* The following line should only be modified for localized versions.     */
        /* It consists of any number of WORD,WORD pairs, with each pair           */
        /* describing a language,codepage combination supported by the file.      */
        /*                                                                        */
        /* For example, a file might have values "0x409,1252" indicating that it  */
        /* supports English language (0x409) in the Windows ANSI codepage (1252). */
        VALUE "Translation", 0x409, 1252
    END
END
Copy the following file from "VisualFBEditor\Resources" to Folder "Resources\" as project resources
About.png
Cut.png
Exit.png
File.png
Open.png
Paste.png
Save.png
SaveAll.png
Last edited by Avata on Aug 18, 2022 6:09, edited 2 times in total.
flaviofornazier
Posts: 59
Joined: Oct 10, 2015 7:19
Location: Brazil

Re: VisualFBEditor - IDE for FreeBasic

Post by flaviofornazier »

Avata wrote: Aug 15, 2022 17:22
flaviofornazier wrote: Aug 15, 2022 4:34
Hi Mr.Bekchanov,

SQLite Component events has been successfully fixed.

Thank you very much.
It is better post the test code and someone could run it and maybe improve it.

Like the MDIForm testing

MDIForm.VBP

Code: Select all

File=Form2.frm
*File=MDIForm.frm
File=Form1.rc
ProjectType=0
Subsystem=2
ProjectName=""
HelpFileName=""
ProjectDescription=""
PassAllModuleFilesToCompiler=false
MajorVersion=0
MinorVersion=0
RevisionVersion=0
BuildVersion=96
AutoIncrementVersion=false
ApplicationTitle=""
ApplicationIcon=""
Manifest=true
RunAsAdministrator=false
CompanyName=""
FileDescription="{ProjectDescription}"
InternalName=""
LegalCopyright=""
LegalTrademarks=""
OriginalFilename=""
ProductName="{ProjectName}"
CompileTo=0
OptimizationLevel=0
OptimizationFastCode=false
OptimizationSmallCode=false
CompilationArguments32Windows=""
CompilationArguments64Windows=""
CompilationArguments32Linux=""
CompilationArguments64Linux=""
CompilerPath=""
CommandLineArguments=""
CreateDebugInfo=false
AndroidSDKLocation=""
AndroidNDKLocation=""
JDKLocation=""

MDIForm.frm

Code: Select all

#ifdef __FB_WIN32__
	#cmdline "Form1.rc"
#endif
'#Region "Form"
	#include once "mff/Form.bi"
	#include once "mff/Menus.bi"
	#include once "mff/ReBar.bi"
	#include once "mff/ImageList.bi"
	
	Using My.Sys.Forms
	
	Type MDIFormType Extends Form
		Declare Static Sub _mnuFileOpen_Click(ByRef Sender As MenuItem)
		Declare Sub mnuFileOpen_Click(ByRef Sender As MenuItem)
		Declare Static Sub _mnuEditCopy_Click(ByRef Sender As MenuItem)
		Declare Sub mnuEditCopy_Click(ByRef Sender As MenuItem)
		Declare Static Sub _mnuEditCut_Click(ByRef Sender As MenuItem)
		Declare Sub mnuEditCut_Click(ByRef Sender As MenuItem)
		Declare Static Sub _mnuFileExit_Click(ByRef Sender As MenuItem)
		Declare Sub mnuFileExit_Click(ByRef Sender As MenuItem)
		Declare Static Sub _mnuFileNew_Click(ByRef Sender As MenuItem)
		Declare Sub mnuFileNew_Click(ByRef Sender As MenuItem)
		Declare Constructor
		
		Dim As MainMenu MainMenu1
		Dim As MenuItem mnuFile, mnuFileNew, mnuFileOpen, mnuFileSave, mnuFileSaveAs, mnuFileBar1, mnuFileBar2, mnuFileClose, mnuFileSaveAll, mnuFileBar3, mnuFileProperties, mnuFilePrintSetup, mnuFilePrintPreview, mnuFilePrint, mnuFileBar4, mnuFileSend, mnuFileBar5, mnuFileExit
		Dim As MenuItem mnuEdit, mnuEditUndo, mnuRedo, mnuEditCopy, mnuEditCut, mnuEditPaste, mnuEditBar1, mnuEditPasteSpecial, mnuEditBar2, mnuEditDSelectAll, mnuEditInvertSelection
		Dim As MenuItem mnuView, mnuViewToolbar, mnuViewStatusBar, mnuViewBar1, mnuViewLargeIcons, mnuViewSmallIcons, mnuViewList, mnuViewDetails, mnuViewBar2, mnuViewArrangeIcons, mnuVAIByName, mnuVAIByType, mnuVAIBySize, mnuVAIByDate, mnuViewLineUpIcons, mnuViewBar3, mnuViewRefresh , mnuViewOptions
		Dim As MenuItem mnuHelp, mnuHelpContent, mnuHelpAbout, mnuHelpSearch, mnuHelpBar1
		Dim As MenuItem mnuWindow, mnuWindowNewWindow, mnuWindowCascade, mnuWindowTileHorizontal, mnuWindowTileVertical, mnuWindowArrangeIcons, mnuWindowBar1
		Dim As ReBar ReBar1
		Dim As ImageList ImageList1
	End Type
	
	Constructor MDIFormType
		' MDIForm
		With This
			.Name = "MDIForm"
			.Text = "MDIMain"
			.Designer = @This
			.Menu = @MainMenu1
			.FormStyle = FormStyles.fsMDIForm
			#ifdef __USE_GTK__
				This.Icon.LoadFromFile(ExePath & "VisualFBEditor.ico")
			#else
				This.Icon.LoadFromResourceID(1)
			#endif
			'.WindowState = WindowStates.wsMaximized
			.Caption = "MDIMain"
			.SetBounds 0, 0, 350, 319
		End With
		' ImageList1
		With ImageList1
			.Name = "ImageList1"
			.ImageWidth = 16
			.ImageHeight = 16
			.SetBounds 116, 70, 16, 16
			.Designer = @This
			.Add "New ", "New"
			.Add "About", "About"
			.Add "Cut", " Cut"
			.Add "Exit", "Exit"
			.Add "File", "File"
			.Add "Open", "Open"
			.Add "Paste", "Paste"
			.Add "Save", " Save"
			.Add "SaveAll", "SaveAll"
			.Parent = @This
		End With
		' MainMenu1
		With MainMenu1
			.Name = "MainMenu1"
			.SetBounds 81, 69, 16, 16
			.Designer = @This
			.Parent = @This
		End With
		' mnuFile
		With mnuFile
			.Name = "mnuFile"
			.Designer = @This
			.Caption = "&File"
			.ParentMenu = @MainMenu1
		End With
		' mnuFileNew
		With mnuFileNew
			.Name = "mnuFileNew"
			.Designer = @This
			.Caption = "&New" & !"\tCtrl+N"
			.ImageKey = "New"
			.onClick = @_mnuFileNew_Click
			.Parent = @mnuFile
		End With
		' mnuFileOpen
		With mnuFileOpen
			.Name = "mnuFileOpen"
			.Designer = @This
			.Caption = "&Open" & !"\tCtrl+O"
			.ImageKey = "Open"
			.onClick = @_mnuFileOpen_Click
			.Parent = @mnuFile
		End With
		' mnuFileClose
		With mnuFileClose
			.Name = "mnuFileClose"
			.Designer = @This
			.Caption = "&Close"
			.Parent = @mnuFile
		End With
		' mnuFileBar1
		With mnuFileBar1
			.Name = "mnuFileBar1"
			.Designer = @This
			.Caption = "-"
			.Parent = @mnuFile
		End With
		' mnuFileSave
		With mnuFileSave
			.Name = "mnuFileSave"
			.Designer = @This
			.Caption = "Save"  & !"\tCtrl+S"
			.ImageKey = "Save"
			.Parent = @mnuFile
		End With
		' mnuFileSaveAs
		With mnuFileSaveAs
			.Name = "mnuFileSaveAs"
			.Designer = @This
			.Caption = "Save &As..."
			.ImageKey = "SaveAs"
			.Parent = @mnuFile
		End With
		' mnuFileSaveAll
		With mnuFileSaveAll
			.Name = "mnuFileSaveAll"
			.Designer = @This
			.Caption = "Save A&ll"
			.Parent = @mnuFile
		End With
		' mnuFileBar2
		With mnuFileBar2
			.Name = "mnuFileBar2"
			.Designer = @This
			.Caption = "-"
			.Parent = @mnuFile
		End With
		' mnuFileProperties
		With mnuFileProperties
			.Name = "mnuFileProperties"
			.Designer = @This
			.Caption = "Propert&ies"
			.Parent = @mnuFile
		End With
		' mnuFileBar3
		With mnuFileBar3
			.Name = "mnuFileBar3"
			.Designer = @This
			.Caption = "-"
			.Parent = @mnuFile
		End With
		' mnuFilePrintSetup
		With mnuFilePrintSetup
			.Name = "mnuFilePrintSetup"
			.Designer = @This
			.Caption = "Print Set&up..."
			.Parent = @mnuFile
		End With
		' mnuFilePrintPreview
		With mnuFilePrintPreview
			.Name = "mnuFilePrintPreview"
			.Designer = @This
			.Caption = "Print Pre&view"
			.MenuIndex = 11
			.Parent = @mnuFile
		End With
		' mnuFilePrint
		With mnuFilePrint
			.Name = "mnuFilePrint"
			.Designer = @This
			.Caption = "&Print..." & !"\tCtrl+P"
			.Parent = @mnuFile
		End With
		' mnuFileBar4
		With mnuFileBar4
			.Name = "mnuFileBar4"
			.Designer = @This
			.Caption = "-"
			.Parent = @mnuFile
		End With
		' mnuFileSend
		With mnuFileSend
			.Name = "mnuFileSend"
			.Designer = @This
			.Caption = "Sen&d..."
			.Parent = @mnuFile
		End With
		' mnuFileBar5
		With mnuFileBar5
			.Name = "mnuFileBar5"
			.Designer = @This
			.Caption = "-"
			.Parent = @mnuFile
		End With
		' mnuFileExit
		With mnuFileExit
			.Name = "mnuFileExit"
			.Designer = @This
			.Caption = "E&xit"
			.ImageKey = "Exit"
			.onClick = @_mnuFileExit_Click
			.Parent = @mnuFile
		End With
		' mnuEdit
		With mnuEdit
			.Name = "mnuEdit"
			.Designer = @This
			.Caption = "&Edit"
			.ParentMenu = @MainMenu1
		End With
		' mnuRedo
		With mnuRedo
			.Name = "mnuRedo"
			.Designer = @This
			.Caption = "&Redo"
			.Parent = @mnuEdit
		End With
		' mnuEditUndo
		With mnuEditUndo
			.Name = "mnuEditUndo"
			.Designer = @This
			.Caption = "&Undo"
			.Parent = @mnuEdit
		End With
		' mnuEditBar1
		With mnuEditBar1
			.Name = "mnuEditBar1"
			.Designer = @This
			.Caption = "-"
			.Parent = @mnuEdit
		End With
		With mnuEditCut
			.Name = "mnuEditCut"
			.Designer = @This
			.Caption = "Cu&t"
			.ImageKey = "Cut"
			.onClick = @_mnuEditCut_Click
			.Parent =  @mnuEdit
		End With
		' mnuEditCopy
		With mnuEditCopy
			.Name = "mnuEditCopy"
			.Designer = @This
			.Caption = "&Copy"
			.ImageKey = "Copy"
			.onClick = @_mnuEditCopy_Click
			.Parent = @mnuEdit
		End With
		' mnuEditPaste
		With mnuEditPaste
			.Name = "mnuEditPaste"
			.Designer = @This
			.Caption = "&Paste"
			.ImageKey = "Paste"
			.Parent = @mnuEdit
		End With
		' mnuEditPasteSpecial
		With mnuEditPasteSpecial
			.Name = "mnuEditPasteSpecial"
			.Designer = @This
			.Caption = "Paste &Special..."
			.Parent = @mnuEdit
		End With
		' mnuEditBar2
		With mnuEditBar2
			.Name = "mnuEditBar2"
			.Designer = @This
			.Caption = "-"
			.Parent = @mnuEdit
		End With
		' mnuEditDSelectAll
		With mnuEditDSelectAll
			.Name = "mnuEditDSelectAll"
			.Designer = @This
			.Caption = "Select &All"
			.Parent = @mnuEdit
		End With
		' mnuEditInvertSelection
		With mnuEditInvertSelection
			.Name = "mnuEditInvertSelection"
			.Designer = @This
			.Caption = "&Invert Selection"
			.Parent = @mnuEdit
		End With
		' mnuView
		With mnuView
			.Name = "mnuView"
			.Designer = @This
			.Caption = "&View"
			.ParentMenu = @MainMenu1
		End With
		With mnuViewToolbar
			.Name = "mnuViewToolbar"
			.Caption         =   "&Toolbar"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewStatusBar
			.Name = "mnuViewStatusBar"
			.Caption         =   "Status &Bar"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewBar1
			.Name = "mnuViewBar1"
			.Caption         =   "-"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewLargeIcons
			.Name = "mnuViewLargeIcons"
			.Caption         =   "Lar&ge Icons"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewSmallIcons
			.Name = "mnuViewSmallIcons"
			.Caption         =   "S&mall Icons"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewList
			.Name = "mnuViewList"
			.Caption         =   "&List"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewDetails
			.Name = "mnuViewDetails"
			.Caption         =   "&Details"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewBar2
			.Name = "mnuViewBar2"
			.Caption         =   "-"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewArrangeIcons
			.Name = "mnuViewArrangeIcons"
			.Caption         =   "Arrange &Icons"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuVAIByName
			.Name = "mnuVAIByName"
			.Caption         =   "by &Name"
			.Designer = @This
			.Parent = @mnuViewArrangeIcons
		End With
		With mnuVAIByType
			.Name = "mnuVAIByType"
			.Caption         =   "by &Type"
			.Designer = @This
			.Parent = @mnuViewArrangeIcons
		End With
		With mnuVAIBySize
			.Name = "mnuVAIBySize"
			.Caption         =   "by Si&ze"
			.Designer = @This
			.Parent = @mnuViewArrangeIcons
		End With
		With mnuVAIByDate
			.Name = "mnuVAIByDate"
			.Caption         =   "by &Date"
			.Designer = @This
			.Parent = @mnuViewArrangeIcons
		End With
		With mnuViewLineUpIcons
			.Name = "mnuViewLineUpIcons"
			.Caption         =   "Li&ne Up Icons"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewBar3
			.Name = "mnuViewBar3"
			.Caption         =   "-"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewRefresh
			.Name = "mnuViewRefresh"
			.Caption         =   "&Refresh"
			.Designer = @This
			.Parent = @mnuView
		End With
		With mnuViewOptions
			.Name = "mnuViewOptions"
			.Caption         =   "&Options..."
			.Designer = @This
			.Parent = @mnuView
		End With
		
		With mnuWindow
			.Name = "mnuWindow"
			.Caption         =   "&Window"
			.Designer = @This
			.Parent = @MainMenu1
		End With
		With mnuWindowNewWindow
			.Name = "mnuWindowNewWindow"
			.Caption         =   "&New Window"
			.Designer = @This
			.Parent = @mnuWindow
		End With
		With mnuWindowCascade
			.Caption         =   "&Cascade"
			.Designer = @This
			.Parent = @mnuWindow
		End With
		With mnuWindowTileHorizontal
			.Name = "mnuWindowTileHorizontal"
			.Caption         =   "Tile &Horizontal"
			.Designer = @This
			.Parent = @mnuWindow
		End With
		With mnuWindowTileVertical
			.Name = "mnuWindowTileVertical"
			.Caption         =   "Tile &Vertical"
			.Designer = @This
			.Parent = @mnuWindow
		End With
		With mnuWindowArrangeIcons
			.Name= "mnuWindowArrangeIcons"
			.Caption         =   "&Arrange Icons"
			.Designer = @This
			.Parent = @mnuWindow
		End With
		With mnuWindowBar1
			.Name= "mnuWindowBar1"
			.Caption         =   "-"
			.Designer = @This
			.Parent = @mnuWindow
		End With
		' mnuHelp
		With mnuHelp
			.Name = "mnuHelp"
			.Designer = @This
			.Caption = "&Help"
			.ParentMenu = @MainMenu1
		End With
		' mnuHelpContent
		With mnuHelpContent
			.Name = "mnuHelpContent"
			.Designer = @This
			.Caption = "&Contents"
			.Parent = @mnuHelp
		End With
		' mnuHelpSearch
		With mnuHelpSearch
			.Name = "mnuHelpSearch"
			.Designer = @This
			.Caption = "&Search For Help On..."
			.Parent = @mnuHelp
		End With
		' mnuHelpBar1
		With mnuHelpBar1
			.Name = "mnuHelpBar1"
			.Designer = @This
			.Caption = "-"
			.Parent = @mnuHelp
		End With
		' mnuHelpAbout
		With mnuHelpAbout
			.Name = "mnuHelpAbout"
			.Designer = @This
			.Caption = "About"
			.ImageKey = "About"
			.Parent = @mnuHelp
		End With
		' ReBar1
		With ReBar1
			.Name = "ReBar1"
			.Text = "ReBar1"
			.SetBounds 6, 4, 324, 18
			.Designer = @This
			.Parent = @This
		End With
		
	End Constructor
	
	Private Sub MDIFormType._mnuFileNew_Click(ByRef Sender As MenuItem)
		*Cast(MDIFormType Ptr, Sender.Designer).mnuFileNew_Click(Sender)
	End Sub
	
	Private Sub MDIFormType._mnuFileExit_Click(ByRef Sender As MenuItem)
		*Cast(MDIFormType Ptr, Sender.Designer).mnuFileExit_Click(Sender)
	End Sub
	
	Private Sub MDIFormType._mnuEditCut_Click(ByRef Sender As MenuItem)
		*Cast(MDIFormType Ptr, Sender.Designer).mnuEditCut_Click(Sender)
	End Sub
	
	Private Sub MDIFormType._mnuEditCopy_Click(ByRef Sender As MenuItem)
		*Cast(MDIFormType Ptr, Sender.Designer).mnuEditCopy_Click(Sender)
	End Sub
	
	Private Sub MDIFormType._mnuFileOpen_Click(ByRef Sender As MenuItem)
		*Cast(MDIFormType Ptr, Sender.Designer).mnuFileOpen_Click(Sender)
	End Sub
	
	Dim Shared MDIForm As MDIFormType
	
	#ifndef _NOT_AUTORUN_FORMS_
		#define _NOT_AUTORUN_FORMS_
		
		MDIForm.Show
		
		App.Run
	#endif
'#End Region

#include once "Form2.frm"

Private Sub MDIFormType.mnuFileOpen_Click(ByRef Sender As MenuItem)
	Form2.Show MDIForm
End Sub

Private Sub MDIFormType.mnuEditCopy_Click(ByRef Sender As MenuItem)
	MsgBox "Place Copy Code here!"
End Sub

Private Sub MDIFormType.mnuEditCut_Click(ByRef Sender As MenuItem)
	MsgBox "Place Cut Code here!"
End Sub

Private Sub MDIFormType.mnuFileExit_Click(ByRef Sender As MenuItem)
	This.ModalResult = ModalResults.OK
	This.CloseForm
End Sub

Private Sub MDIFormType.mnuFileNew_Click(ByRef Sender As MenuItem)
	MsgBox "Place New Code here!"
End Sub
form2.frm

Code: Select all

#ifdef __FB_WIN32__
	#cmdline "Form1.rc"
#endif
'#Region "Form"
	#include once "mff/Form.bi"
	#include once "mff/CommandButton.bi"
	#include once "mff/ImageList.bi"
	
	Using My.Sys.Forms
	
	Type Form2Type Extends Form
		Declare Static Sub _CommandButton1_Click(ByRef Sender As Control)
		Declare Sub CommandButton1_Click(ByRef Sender As Control)
		Declare Static Sub _Form_Click(ByRef Sender As Control)
		Declare Sub Form_Click(ByRef Sender As Control)
		Declare Static Sub _CommandButton1_KeyPress(ByRef Sender As Control, Key As Integer)
		Declare Sub CommandButton1_KeyPress(ByRef Sender As Control, Key As Integer)
		Declare Static Sub _CommandButton1_KeyUp(ByRef Sender As Control, Key As Integer, Shift As Integer)
		Declare Sub CommandButton1_KeyUp(ByRef Sender As Control, Key As Integer, Shift As Integer)
		Declare Constructor
		
		Dim As CommandButton CommandButton1
		Dim As ImageList ImageList1
	End Type
	
	Constructor Form2Type
		' Form2
		With This
			.Name = "Form2"
			.Text = "Form2"
			.FormStyle = FormStyles.fsMDIChild
			#ifdef __USE_GTK__
				This.Icon.LoadFromFile(ExePath & "VisualFBEditor.ico")
			#else
				This.Icon.LoadFromResourceID(1)
			#endif
			.Designer = @This
			.onClick = @_Form_Click
			.SetBounds 0, 0, 350, 300
		End With
		' CommandButton1
		With CommandButton1
			.Name = "CommandButton1"
			.Text = "CommandButton1"
			.TabIndex = 0
			.SetBounds 83, 220, 133, 29
			.Designer = @This
			.OnClick = @_CommandButton1_Click
			.OnKeyPress = @_CommandButton1_KeyPress
			.OnKeyUp = @_CommandButton1_KeyUp
			.Parent = @This
		End With
		' ImageList1
		With ImageList1
			.Name = "ImageList1"
			.SetBounds 141, 104, 16, 16
			.Designer = @This
			.Parent = @This
		End With
	End Constructor
	
	Private Sub Form2Type._CommandButton1_KeyUp(ByRef Sender As Control, Key As Integer, Shift As Integer)
		*Cast(Form2Type Ptr, Sender.Designer).CommandButton1_KeyUp(Sender, Key, Shift)
	End Sub
	
	Private Sub Form2Type._CommandButton1_KeyPress(ByRef Sender As Control, Key As Integer)
		*Cast(Form2Type Ptr, Sender.Designer).CommandButton1_KeyPress(Sender, Key)
	End Sub
	
	Private Sub Form2Type._Form_Click(ByRef Sender As Control)
		*Cast(Form2Type Ptr, Sender.Designer).Form_Click(Sender)
	End Sub
	
	Private Sub Form2Type._CommandButton1_Click(ByRef Sender As Control)
		*Cast(Form2Type Ptr, Sender.Designer).CommandButton1_Click(Sender)
	End Sub
	
	Dim Shared Form2 As Form2Type
	
	#ifndef _NOT_AUTORUN_FORMS_
		#define _NOT_AUTORUN_FORMS_
		
		Form2.Show
		
		App.Run
	#endif
'#End Region

'#include once "Form3.frm"

Private Sub Form2Type.CommandButton1_Click(ByRef Sender As Control)
	'Form3.Show MDIForm
End Sub

Private Sub Form2Type.Form_Click(ByRef Sender As Control)
	MsgBox "This is form2"
	'Form3.Show MDIForm
End Sub

Private Sub Form2Type.CommandButton1_KeyPress(ByRef Sender As Control, Key As Integer)
	
End Sub

Private Sub Form2Type.CommandButton1_KeyUp(ByRef Sender As Control, Key As Integer, Shift As Integer)
	
End Sub
Hi Mr.Avata,

I will test it later and give you a feedback.

Regards.
flaviofornazier
Posts: 59
Joined: Oct 10, 2015 7:19
Location: Brazil

Re: VisualFBEditor - IDE for FreeBasic

Post by flaviofornazier »

flaviofornazier wrote: Aug 15, 2022 4:34
Xusinboy Bekchanov wrote: Aug 14, 2022 7:37
flaviofornazier wrote: Aug 14, 2022 7:04

Well, In event "ErrorOut" I'm receiving data destined to event "SQLString" and vice versa.
Here I have swapped:
https://github.com/XusinboyBekchanov/Vi ... ad6d761afe
Hi Mr.Bekchanov,

All questions and small issues are related to VisualFBEditor, especially to GUI projects.
I'm posting here cause I think VFB needs visibility, I hope you don't mind...

Issues:

- SQLite Component: Missing "Mode" property, that define static or dynamic compilation.

- "Error Handling" located on the IDE toolbar is really very useful, before write "Exit Function" please check if the procedure is a sub or a function.

- Command button "default" property only works if you set form "default button" property too.

Requests:

- The name of the currently component as a "Caption" on top of the Properties/Events window would be interesting to avoid confusion.

- A new menu and/or toolbar option like "Add Sub and/or Function" inside the active code window. The general doubt is "where declare and write a sub and/or function inside the form code".

- Assuming that you have total control under code inside form #Region and #End Region, an option to review/reescan forms code and delete all references to components that no longer exist.

Questions inside form code:

- Where is the right place to declare a sub or function at form level and write its code? (a procedure that can access all form components )

- Where is the right place to define a shared variable?

- If I have an invisible command button named cmdList in the form, can I call its default event like a sub? e.g.: cmdList_Click(cmdList). The sender is the name of control?

- How to dynamically create a new modal instance of a form?

Thank you in advanced.
Xusinboy Bekchanov
Posts: 789
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

flaviofornazier wrote: Aug 15, 2022 21:37 Issues:

- SQLite Component: Missing "Mode" property, that define static or dynamic compilation.
It can be done.
flaviofornazier wrote: Aug 15, 2022 21:37 - "Error Handling" located on the IDE toolbar is really very useful, before write "Exit Function" please check if the procedure is a sub or a function.
Fixed: The Error Handling function will fire the correct exit operator:
https://github.com/XusinboyBekchanov/Vi ... 6893677a52
flaviofornazier wrote: Aug 15, 2022 21:37 - Command button "default" property only works if you set form "default button" property too.
Improved: Setting the default property of a CommandButton sets or unsets the DefaultButton property of the parent Form:
https://github.com/XusinboyBekchanov/My ... b64bfecaac
flaviofornazier
Posts: 59
Joined: Oct 10, 2015 7:19
Location: Brazil

Re: VisualFBEditor - IDE for FreeBasic

Post by flaviofornazier »

Xusinboy Bekchanov wrote: Aug 16, 2022 3:01
flaviofornazier wrote: Aug 15, 2022 21:37 Issues:

- SQLite Component: Missing "Mode" property, that define static or dynamic compilation.
It can be done.
flaviofornazier wrote: Aug 15, 2022 21:37 - "Error Handling" located on the IDE toolbar is really very useful, before write "Exit Function" please check if the procedure is a sub or a function.
Fixed: The Error Handling function will fire the correct exit operator:
https://github.com/XusinboyBekchanov/Vi ... 6893677a52
flaviofornazier wrote: Aug 15, 2022 21:37 - Command button "default" property only works if you set form "default button" property too.
Improved: Setting the default property of a CommandButton sets or unsets the DefaultButton property of the parent Form:
https://github.com/XusinboyBekchanov/My ... b64bfecaac
About SDI applications, except main form, anothers forms are not getting destroyed when I click the close button.
If I call them again, the data that was in the components is still there and when I close the main form I get a lot of
errors. What's happening? I'm missing something? Please help me! ;(
Xusinboy Bekchanov
Posts: 789
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

flaviofornazier wrote: Aug 16, 2022 6:01 About SDI applications, except main form, anothers forms are not getting destroyed when I click the close button.
If I call them again, the data that was in the components is still there and when I close the main form I get a lot of
errors. What's happening? I'm missing something? Please help me! ;(
Give an example.
flaviofornazier
Posts: 59
Joined: Oct 10, 2015 7:19
Location: Brazil

Re: VisualFBEditor - IDE for FreeBasic

Post by flaviofornazier »

Xusinboy Bekchanov wrote: Aug 16, 2022 6:34
flaviofornazier wrote: Aug 16, 2022 6:01 About SDI applications, except main form, anothers forms are not getting destroyed when I click the close button.
If I call them again, the data that was in the components is still there and when I close the main form I get a lot of
errors. What's happening? I'm missing something? Please help me! ;(
Give an example.
http://www.makesystems.com.br/pub/sqlite.rar
http://www.makesystems.com.br/pub/sqlite.zip
http://www.makesystems.com.br/pub/sqlite.7z
Xusinboy Bekchanov
Posts: 789
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

flaviofornazier wrote: Aug 16, 2022 6:46
Xusinboy Bekchanov wrote: Aug 16, 2022 6:34
flaviofornazier wrote: Aug 16, 2022 6:01 About SDI applications, except main form, anothers forms are not getting destroyed when I click the close button.
If I call them again, the data that was in the components is still there and when I close the main form I get a lot of
errors. What's happening? I'm missing something? Please help me! ;(
Give an example.
http://www.makesystems.com.br/pub/sqlite.rar
http://www.makesystems.com.br/pub/sqlite.zip
http://www.makesystems.com.br/pub/sqlite.7z
This site doesn't work for me. You can save here:
https://github.com/XusinboyBekchanov/Vi ... ssions/276
flaviofornazier
Posts: 59
Joined: Oct 10, 2015 7:19
Location: Brazil

Re: VisualFBEditor - IDE for FreeBasic

Post by flaviofornazier »

Post Reply