#INCLUDE ONCE "mff/Form.bi"
#INCLUDE ONCE "mff/Chart.bi"
#INCLUDE ONCE "mff/Grid.bi"
#INCLUDE ONCE "mff/CommandButton.bi"
#INCLUDE ONCE "mff/TextBox.bi"
MyFbFramework - My FreeBasic Framework
-
- Posts: 679
- Joined: Jul 26, 2018 18:28
Re: MyFbFramework - My FreeBasic Framework
I always clone, build and use latest mff and VisualFBEditor
the statistics when the default setting is used(i.e. click "project"-"project properities"-"compile"-"compile by default"):
mff cloned on date, EXE size
April 22nd, 633.5k
Sep 28th, 897.5k
Sep 30th, 767.5k
Oct 1st, 768.5k
If I set to "project"-"project properities"-"compile"-"compile to GCC" - "optimize for small code", the EXE is 461.0k on Oct 1st. I forget to test on "optimize for small code" on April 22nd and Sep 28th. But I believe mff on April 22nd can produce a smaller EXE than 461.0k.
Well, the size problem is not a big problem which should has a low priority then others. Please do not be too bothered with it.
the statistics when the default setting is used(i.e. click "project"-"project properities"-"compile"-"compile by default"):
mff cloned on date, EXE size
April 22nd, 633.5k
Sep 28th, 897.5k
Sep 30th, 767.5k
Oct 1st, 768.5k
If I set to "project"-"project properities"-"compile"-"compile to GCC" - "optimize for small code", the EXE is 461.0k on Oct 1st. I forget to test on "optimize for small code" on April 22nd and Sep 28th. But I believe mff on April 22nd can produce a smaller EXE than 461.0k.
Well, the size problem is not a big problem which should has a low priority then others. Please do not be too bothered with it.

-
- Posts: 679
- Joined: Jul 26, 2018 18:28
Re: MyFbFramework - My FreeBasic Framework
Added: Application_Controls_Get_Off, Application_ControlCount_Get_Off, Application_Title_Get_Off, Application_GetVerInfo_Off, Application_GetControls_Off, Application_Forms_Get_Off, BitmapType_Height_Get_Off, BitmapType_Let_HBITMAP_Off, BitmapType_Let_HICON_Off, BitmapType_Let_WString_Off, BitmapType_LoadFromHICON_Off, BitmapType_SaveToFile_Off, BitmapType_Width_Get_Off, Canvas_DrawTransparent_Off, Canvas_Rectangle_Double_Double_Double_Double_Off, Canvas_TransferDoubleBuffer_Off, Control_IndexOf_String_Off, Control_RecreateWnd_Off, Control_ChangeControlIndex_Off, Control_ChangeStyle_Off, Control_StyleExists_Off, Control_TopLevelControl_Off, Control_Parent_Set_Off, Cursor_LoadFromFile_Off, Cursor_LoadFromResourceID_Off, Cursor_LoadFromResourceName_Off, Cursor_SaveToFile_Off, Debug_Print_Off, Dictionary_Add_Off, Dictionary_Count_Get_Off, Dictionary_IndexOf_Off, Dictionary_IndexOfKey_Off, Dictionary_IndexOfObject_Off, Dictionary_Item_Get_Integer_Off, Dictionary_Sort_Off, Dictionary_SortKeys_Off, Dictionary_Text_Get_Off, Dictionary_Text_Set_Off, DictionaryItem_Key_Get_Off, DictionaryItem_Text_Get_Off, Font_Color_Set_Off, Form_ShowModal_Off, GraphicType_LoadFromFile_Off, GraphicType_LoadFromResourceID_Off, GraphicType_LoadFromResourceName_Off, Icon_Height_Get_Off, Icon_LoadFromResourceID_Off, Icon_LoadFromResourceName_Off, Icon_ResName_Set_Off, Icon_SaveToFile_Off, Icon_Width_Get_Off, ImageList_Add_WString_Off, ImageList_AddFromFile_Off, ImageList_Clear_Off, ImageList_GetBitmap_Integer_Off, ImageList_GetCursor_Integer_Off, ImageList_GetIcon_Integer_Off, ImageList_GetMask_Integer_Off, ImageList_IndexOf_Off, ImageList_Remove_Integer_Off, IntegerList_IndexOf_Off, MainHandle_Off, Menu_Color_Set_Off, Menu_IndexOf_WString_Off, Menu_Item_Set_MenuItem_Off, MenuItem_IndexOf_WString_Off, MenuItem_Insert_Off, MenuItem_Find_WString_Off, MenuItem_Image_Set_BitmapType_Off, MenuItem_ImageIndex_Set_Off, MenuItem_Name_Set_Off, List_Item_Set_Off, LoadFromFile_Off, Replace_Off, SaveToFile_Off, WStringList_Add_Off, WStringList_IndexOf_Off, WStringList_IndexOfObject_Off, WStringList_MatchCase_Get_Off, WStringList_Sort_Off, WStringList_Text_Set_Off defines:oyster wrote: ↑Oct 01, 2022 10:03 I always clone, build and use latest mff and VisualFBEditor
the statistics when the default setting is used(i.e. click "project"-"project properities"-"compile"-"compile by default"):
mff cloned on date, EXE size
April 22nd, 633.5k
Sep 28th, 897.5k
Sep 30th, 767.5k
Oct 1st, 768.5k
If I set to "project"-"project properities"-"compile"-"compile to GCC" - "optimize for small code", the EXE is 461.0k on Oct 1st. I forget to test on "optimize for small code" on April 22nd and Sep 28th. But I believe mff on April 22nd can produce a smaller EXE than 461.0k.
Well, the size problem is not a big problem which should has a low priority then others. Please do not be too bothered with it.![]()
https://github.com/XusinboyBekchanov/My ... 721c4cded1
Added: Off Defines for Application, Brush, Chart, CommandButton, Component, Control, DoubleList, Grid, Pen, TextBox, UString, StringParseCount and Match:
https://github.com/XusinboyBekchanov/My ... 81e48e96f1
Now you can use such defines to reduce the code used:
Code: Select all
'#Region "Form"
'#Region Off_Defines
#define ReadProperty_Off
#define WriteProperty_Off
#define Application_Controls_Get_Off
#define Application_ControlCount_Get_Off
#define Application_DoEvents_Off
'#define Application_GetVerInfo_Off
#define Application_GetControls_Off
'#define Application_Forms_Get_Off
'#define Application_Title_Get_Off
#define BitmapType_Height_Get_Off
#define BitmapType_Let_HBITMAP_Off
#define BitmapType_Let_HICON_Off
#define BitmapType_Let_WString_Off
#define BitmapType_LoadFromHICON_Off
#define BitmapType_SaveToFile_Off
#define BitmapType_Width_Get_Off
#define Brush_Color_Get_Off
#define Canvas_DrawTransparent_Off
#define Canvas_Rectangle_Double_Double_Double_Double_Off
#define Canvas_TransferDoubleBuffer_Off
#define Chart_AddAxisItems_Off
#define Chart_AddItem_Off
#define Chart_AddSerie_Off
#define Chart_LabelsVisible_Get_Off
#define Chart_LabelsVisible_Set_Off
#define Chart_Wait_Off
#define CommandButton_EnumMenuItems_Off
#define CommandButton_Style_Get_Off
#define Component_GetTopLevel_Off
#define Component_Left_Set_Off
#define Component_Top_Set_Off
#define Control_IndexOf_String_Off
#define Control_RecreateWnd_Off
#define Control_ChangeControlIndex_Off
#define Control_ChangeStyle_Off
#define Control_ChangeTabStop_Off
#define Control_GetTextLength_Off
#define Control_StyleExists_Off
#define Control_TopLevelControl_Off
'#define Control_Parent_Set_Off
#define Cursor_LoadFromFile_Off
#define Cursor_LoadFromResourceID_Off
#define Cursor_LoadFromResourceName_Off
#define Cursor_SaveToFile_Off
#define Debug_Print_Off
#define Dictionary_Add_Off
#define Dictionary_Count_Get_Off
#define Dictionary_IndexOf_Off
'#define Dictionary_IndexOfKey_Off
#define Dictionary_IndexOfObject_Off
#define Dictionary_Item_Get_Integer_Off
#define Dictionary_Sort_Off
#define Dictionary_SortKeys_Off
#define Dictionary_Text_Get_Off
#define Dictionary_Text_Set_Off
'#define DictionaryItem_Key_Get_Off
#define DictionaryItem_Text_Get_Off
#define DoubleList_Add_Off
#define DoubleList_Exchange_Off
#define DoubleList_IndexOf_Off
#define Font_Color_Set_Off
#define Form_ShowModal_Off
#define GraphicType_LoadFromFile_Off
#define GraphicType_LoadFromResourceID_Off
#define GraphicType_LoadFromResourceName_Off
#define Grid_ChangeLVExStyle_Off
#define Grid_SelectedColumn_Off
#define Grid_SelectedRow_Off
#define GridColumn_Format_Set_Off
#define GridColumn_ImageIndex_Set_Off
#define GridColumn_Width_Set_Off
#define GridRow_ImageKey_Set_Off
#define GridRow_ImageIndex_Set_Off
#define GridRow_Indent_Set_Off
#define GridRow_Item_Off
#define GridRow_State_Set_Off
#define GridRows_Add_Integer_Off
#define GridRows_CompareFunc_Off
#define Icon_Height_Get_Off
#define Icon_LoadFromResourceID_Off
#define Icon_LoadFromResourceName_Off
#define Icon_ResName_Set_Off
#define Icon_SaveToFile_Off
#define Icon_Width_Get_Off
#define ImageList_Add_WString_Off
#define ImageList_AddFromFile_Off
#define ImageList_Clear_Off
#define ImageList_GetBitmap_Integer_Off
#define ImageList_GetCursor_Integer_Off
#define ImageList_GetIcon_Integer_Off
#define ImageList_GetMask_Integer_Off
'#define ImageList_IndexOf_Off
#define ImageList_Remove_Integer_Off
'#define IntegerList_IndexOf_Off
'#define List_Item_Set_Off
#define LoadFromFile_Off
#define MainHandle_Off
#define Match_Off
#define Menu_Color_Set_Off
#define Menu_IndexOf_WString_Off
#define Menu_Item_Set_MenuItem_Off
#define MenuItem_IndexOf_WString_Off
#define MenuItem_Insert_Off
#define MenuItem_Find_WString_Off
#define MenuItem_Image_Set_BitmapType_Off
#define MenuItem_ImageIndex_Set_Off
#define MenuItem_Name_Set_Off
#define Pen_Color_Get_Off
#define Pen_Color_Set_Off
#define Pen_Create_Off
#define Pen_Size_Set_Off
'#define Replace_Off
#define SaveToFile_Off
#define StringParseCount_Off
#define TextBox_InsertLine_Off
#define TextBox_LinesCount_Off
#define WAdd_Off
'#define WStringList_Add_Off
#define WStringList_IndexOf_Off
#define WStringList_IndexOfObject_Off
#define WStringList_MatchCase_Get_Off
#define WStringList_Sort_Off
#define WStringList_Text_Set_Off
'#End Region
#if defined(__FB_MAIN__) AndAlso Not defined(__MAIN_FILE__)
#define __MAIN_FILE__
Const _MAIN_FILE_ = __FILE__
#ifdef __FB_WIN32__
#cmdline "Form1.rc"
#endif
#endif
#include once "mff/Form.bi"
#include once "mff/TextBox.bi"
#include once "mff/Chart.bi"
#include once "mff/Grid.bi"
#include once "mff/CommandButton.bi"
Using My.Sys.Forms
Type Form1Type Extends Form
Declare Constructor
Dim As TextBox TextBox1
Dim As Chart Chart1
Dim As Grid Grid1
Dim As CommandButton CommandButton1
End Type
Constructor Form1Type
' Form1
With This
.Name = "Form1"
.Text = "Form1"
.Designer = @This
.SetBounds 0, 0, 350, 300
End With
' TextBox1
With TextBox1
.Name = "TextBox1"
.Text = "TextBox1"
.TabIndex = 0
.SetBounds 90, 100, 110, 60
.Designer = @This
.Parent = @This
End With
' Chart1
With Chart1
.Name = "Chart1"
.Text = "Chart1"
.SetBounds 40, 10, 140, 40
.Designer = @This
.Parent = @This
End With
' Grid1
With Grid1
.Name = "Grid1"
.Text = "Grid1"
.TabIndex = 1
.SetBounds 20, 60, 40, 60
.Designer = @This
.Parent = @This
End With
' CommandButton1
With CommandButton1
.Name = "CommandButton1"
.Text = "CommandButton1"
.TabIndex = 2
.SetBounds 70, 180, 120, 60
.Designer = @This
.Parent = @This
End With
End Constructor
Dim Shared Form1 As Form1Type
#if _MAIN_FILE_ = __FILE__
Form1.MainForm = True
Form1.Show
App.Run
#endif
'#End Region
These unused procedures have been defined via Project Properties -> Compile -> Compile to GCC -> Advanced Options -> Show unused function warnings.
Re: MyFbFramework - My FreeBasic Framework
any way to clear the output? for example, a right-click mouse menu item?
-
- Posts: 679
- Joined: Jul 26, 2018 18:28
Re: MyFbFramework - My FreeBasic Framework
I always clone, build and use latest mff and VisualFBEditor
the statistics when the default setting is used(i.e. click "project"-"project properities"-"compile"-"compile by default"):
mff cloned on date, EXE size, comment
April 22nd, 633.5k
Sep 28th, 897.5k
Sep 30th, 767.5k
Oct 1st, 768.5k, ReadProperty_Off and WriteProperty_Off
Oct 5th, 704.5k, all available Off Defines used
the statistics when the default setting is used(i.e. click "project"-"project properities"-"compile"-"compile by default"):
mff cloned on date, EXE size, comment
April 22nd, 633.5k
Sep 28th, 897.5k
Sep 30th, 767.5k
Oct 1st, 768.5k, ReadProperty_Off and WriteProperty_Off
Oct 5th, 704.5k, all available Off Defines used
-
- Posts: 679
- Joined: Jul 26, 2018 18:28
Re: MyFbFramework - My FreeBasic Framework
If you send me the mff dated April 22, I can tell you what caused the size increase.oyster wrote: ↑Oct 05, 2022 0:17 I always clone, build and use latest mff and VisualFBEditor
the statistics when the default setting is used(i.e. click "project"-"project properities"-"compile"-"compile by default"):
mff cloned on date, EXE size, comment
April 22nd, 633.5k
Sep 28th, 897.5k
Sep 30th, 767.5k
Oct 1st, 768.5k, ReadProperty_Off and WriteProperty_Off
Oct 5th, 704.5k, all available Off Defines used