VisualFBEditor - IDE for FreeBasic
-
- Posts: 3
- Joined: Nov 12, 2016 8:13
Re: VisualFBEditor - IDE for FreeBasic
I'm having issues starting visualfbeditor on my 4k tv as a monitor. When the scaling is set to 300% (the default) when the splash screen first shows it then freezes. If I set the scaling down to 150% everything is fine. 150% is what I normally have it set at when I use the laptop monitor. I am using version 1.3.2 64-bit on windows 11
-
- Posts: 783
- Joined: Jul 26, 2018 18:28
Re: VisualFBEditor - IDE for FreeBasic
Yes, it was a bug in this version. You can try the new, not yet released version from github. There it was corrected.Spiraleyes wrote: ↑Jun 17, 2022 23:39 I'm having issues starting visualfbeditor on my 4k tv as a monitor. When the scaling is set to 300% (the default) when the splash screen first shows it then freezes. If I set the scaling down to 150% everything is fine. 150% is what I normally have it set at when I use the laptop monitor. I am using version 1.3.2 64-bit on windows 11
-
- Posts: 182
- Joined: Dec 18, 2018 16:37
- Location: Germany, Hessdorf
- Contact:
Re: VisualFBEditor - IDE for FreeBasic
the entyre structure of library must rewrite it, to use dynamic inheritance creation, i know because that library is based on my work. The inheritance mechanysm is not complicated once you understand it,but that is the catch, to understand it well.Go to RqWork7 libs samples, and inspired from there, russian.Imortis wrote: ↑Dec 27, 2018 13:42 This is a very nice looking project! I did have a problem downloading the latest release, but what I saw is very promising. Is the editor also built in FB? If so, where is the source code for that?
Also, you say you want help with the library. What kind of help do you need?
-
- Posts: 783
- Joined: Jul 26, 2018 18:28
Re: VisualFBEditor - IDE for FreeBasic
Thanks a lot, I'll take a look.nastasa eodor wrote: ↑Jun 21, 2022 8:00 the entyre structure of library must rewrite it, to use dynamic inheritance creation, i know because that library is based on my work. The inheritance mechanysm is not complicated once you understand it,but that is the catch, to understand it well.Go to RqWork7 libs samples, and inspired from there, russian.
Re: VisualFBEditor - IDE for FreeBasic
Now the VisualFBEditor got a great progress. Why do not join the team again?nastasa eodor wrote: ↑Jun 21, 2022 8:00 the entyre structure of library must rewrite it, to use dynamic inheritance creation, i know because that library is based on my work. The inheritance mechanysm is not complicated once you understand it,but that is the catch, to understand it well.Go to RqWork7 libs samples, and inspired from there, russian.
Re: VisualFBEditor - IDE for FreeBasic
I like the new Themes function and it is as well as vscode.
-
- Posts: 59
- Joined: Oct 10, 2015 7:19
- Location: Brazil
Re: VisualFBEditor - IDE for FreeBasic
Hi all!
Congratulations to the author, co-workers and users of VisualFBEditor.
Could someone please send me a small "Windows Application" project
with only two forms? (e.g. a mainform calling another form).
I've tried everything, but I always receive the follow error after call
the second form using a command button:
Error: Variable not declared, Form2
I'm sure that I'm missing something...
Thank you in advanced.
PS: Mr.Xusinboy Bekchanov, if you intend to add Portuguese language,
please just point me to the right direction and I'll be glad to do it.
There is no a substantial difference between 5th and 9th most commonly
spoken languages. They revolve around 250 millions of speakers.
Congratulations to the author, co-workers and users of VisualFBEditor.
Could someone please send me a small "Windows Application" project
with only two forms? (e.g. a mainform calling another form).
I've tried everything, but I always receive the follow error after call
the second form using a command button:
Error: Variable not declared, Form2
I'm sure that I'm missing something...
Thank you in advanced.
PS: Mr.Xusinboy Bekchanov, if you intend to add Portuguese language,
please just point me to the right direction and I'll be glad to do it.
There is no a substantial difference between 5th and 9th most commonly
spoken languages. They revolve around 250 millions of speakers.
Re: VisualFBEditor - IDE for FreeBasic
1. This is a example file of single file without include file (.Bi file). At the position before you start call the forms you just need add the code "#include once "Form2.frm“ ” or "#include once "Form2.bi“ if you have a include file (.Bi file)
2. Please Set form1.frm as main forms
3. Add code "Common Shared As Form Ptr pform2" if you want form2 call by all forms and module
4. you can run the code now but it is better start the applicationn from a .bas file module which set as main module. Add the code at the beginning("#include once "Form1.bi“ "#include once "Form2.bi“ ) .
Form1.frm Code
Form2.frm Code
2. Please Set form1.frm as main forms
3. Add code "Common Shared As Form Ptr pform2" if you want form2 call by all forms and module
4. you can run the code now but it is better start the applicationn from a .bas file module which set as main module. Add the code at the beginning("#include once "Form1.bi“ "#include once "Form2.bi“ ) .
Form1.frm Code
Code: Select all
#ifdef __FB_WIN32__
'#cmdline "Form1.rc"
#endif
'#Region "Form"
#include once "mff/Form.bi"
#include once "mff/CommandButton.bi"
Using My.Sys.Forms
Type Form1Type Extends Form
Declare Static Sub _cmdShowForm2_Click(ByRef Sender As Control)
Declare Sub cmdShowForm2_Click(ByRef Sender As Control)
Declare Constructor
Dim As CommandButton cmdShowForm2
End Type
Constructor Form1Type
' Form1
With This
.Name = "Form1"
.Text = "Form1"
.Designer = @This
.SetBounds 0, 0, 350, 300
End With
' cmdShowForm2
With cmdShowForm2
.Name = "cmdShowForm2"
.Text = "cmdShowForm2"
.TabIndex = 0
.SetBounds 67, 93, 92, 27
.Designer = @This
.OnClick = @_cmdShowForm2_Click
.Parent = @This
End With
End Constructor
Private Sub Form1Type._cmdShowForm2_Click(ByRef Sender As Control)
*Cast(Form1Type Ptr, Sender.Designer).cmdShowForm2_Click(Sender)
End Sub
Dim Shared Form1 As Form1Type
#ifndef _NOT_AUTORUN_FORMS_
#define _NOT_AUTORUN_FORMS_
Form1.Show
App.Run
#endif
'#End Region
#include once "Form2.frm"
Private Sub Form1Type.cmdShowForm2_Click(ByRef Sender As Control)
Form2.Show
End Sub
Code: Select all
#ifdef __FB_WIN32__
#cmdline "Form1.rc"
#endif
'#Region "Form"
#include once "mff/Form.bi"
#include once "mff/CommandButton.bi"
Using My.Sys.Forms
Type Form2Type Extends Form
Declare Static Sub _cmdShowMsg_Click(ByRef Sender As Control)
Declare Sub cmdShowMsg_Click(ByRef Sender As Control)
Declare Constructor
Dim As CommandButton cmdShowMsg
End Type
Constructor Form2Type
' Form2
With This
.Name = "Form2"
.Text = "Form1"
.Designer = @This
.SetBounds 0, 0, 350, 300
End With
' cmdShowMsg
With cmdShowMsg
.Name = "cmdShowMsg"
.Text = "click me"
.TabIndex = 0
.Caption = "click me"
.SetBounds 60, 101, 139, 42
.Designer = @This
.OnClick = @_cmdShowMsg_Click
.Parent = @This
End With
End Constructor
Private Sub Form2Type._cmdShowMsg_Click(ByRef Sender As Control)
*Cast(Form2Type Ptr, Sender.Designer).cmdShowMsg_Click(Sender)
End Sub
Dim Shared Form2 As Form2Type
#ifndef _NOT_AUTORUN_FORMS_
#define _NOT_AUTORUN_FORMS_
Form2.Show
App.Run
#endif
'#End Region
Private Sub Form2Type.cmdShowMsg_Click(ByRef Sender As Control)
MsgBox "It's me - form2"
End Sub
Re: VisualFBEditor - IDE for FreeBasic
It is better post this code to github as a samples of projects in VisualFBEditor.
-
- Posts: 783
- Joined: Jul 26, 2018 18:28
Re: VisualFBEditor - IDE for FreeBasic
Thank you.flaviofornazier wrote: ↑Jul 23, 2022 3:33 Hi all!
Congratulations to the author, co-workers and users of VisualFBEditor.
There:flaviofornazier wrote: ↑Jul 23, 2022 3:33 Could someone please send me a small "Windows Application" project
with only two forms? (e.g. a mainform calling another form).
Code: Select all
'#Compile "Form1.rc"
#include once "windows.bi"
#include once "win\commctrl.bi"
Dim MSG As MSG
Dim As WNDCLASSEX wc
Dim As String NameClass = "MyClass"
Dim As HINSTANCE HInst = GetModuleHandle(0)
Dim Shared As HWND Form1, Form2
Function WNDPROC(HWND As HWND, MSG As UInteger, WPARAM As WPARAM, LPARAM As LPARAM) As Integer
Select Case MSG
Case WM_CREATE
Case WM_LBUTTONDOWN
ShowWindow Form2, SW_NORMAL
Case WM_COMMAND
Case WM_CLOSE
If HWND <> Form1 Then ShowWindow HWND, SW_HIDE: Return 0
Case WM_DESTROY
If HWND = Form1 Then PostQuitMessage(0)
End Select
Return DefWindowProc(HWND, MSG, WPARAM, LPARAM)
End Function
With wc
.cbSize = SizeOf(WNDCLASSEX)
.style = CS_HREDRAW Or CS_VREDRAW
.lpfnWndProc = @WNDPROC
.hInstance = HInst
.hIcon = LoadIcon(0, IDI_QUESTION)
.hCursor = LoadCursor(0, IDC_ARROW)
.hbrBackground = Cast(HBRUSH, COLOR_WINDOW)
.lpszClassName = StrPtr(NameClass)
.hIconSm = .hIcon
End With
If RegisterClassEx(@wc) = 0 Then
Print "Register error, press any key"
Sleep
End
EndIf
InitCommonControls
Form1 = CreateWindowEx(0, NameClass, "Main Window", WS_VISIBLE Or WS_OVERLAPPEDWINDOW, 10, 10, 300, 300, 0, 0, HInst, 0)
Form2 = CreateWindowEx(0, NameClass, "Second Window", WS_OVERLAPPEDWINDOW, 20, 20, 300, 100, 0, 0, HInst, 0)
While GetMessage(@MSG, 0, 0, 0)
TranslateMessage(@MSG)
DispatchMessage(@MSG)
Wend
If you are talking about GUI Application then Avata has already answered you.flaviofornazier wrote: ↑Jul 23, 2022 3:33 I've tried everything, but I always receive the follow error after call
the second form using a command button:
Error: Variable not declared, Form2
I'm sure that I'm missing something...
Thank you in advanced.
You can translate this file into Portuguese:flaviofornazier wrote: ↑Jul 23, 2022 3:33 PS: Mr.Xusinboy Bekchanov, if you intend to add Portuguese language,
please just point me to the right direction and I'll be glad to do it.
There is no a substantial difference between 5th and 9th most commonly
spoken languages. They revolve around 250 millions of speakers.
https://github.com/XusinboyBekchanov/Vi ... nglish.lng
-
- Posts: 783
- Joined: Jul 26, 2018 18:28
Re: VisualFBEditor - IDE for FreeBasic
Yes.the examples project help us a lot.
-
- Posts: 59
- Joined: Oct 10, 2015 7:19
- Location: Brazil
Re: VisualFBEditor - IDE for FreeBasic
Mr.Avata,Avata wrote: ↑Jul 23, 2022 6:02 1. This is a example file of single file without include file (.Bi file). At the position before you start call the forms you just need add the code "#include once "Form2.frm“ ” or "#include once "Form2.bi“ if you have a include file (.Bi file)
2. Please Set form1.frm as main forms
3. Add code "Common Shared As Form Ptr pform2" if you want form2 call by all forms and module
4. you can run the code now but it is better start the applicationn from a .bas file module which set as main module. Add the code at the beginning("#include once "Form1.bi“ "#include once "Form2.bi“ ) .
Form1.frm CodeForm2.frm CodeCode: Select all
#ifdef __FB_WIN32__ '#cmdline "Form1.rc" #endif '#Region "Form" #include once "mff/Form.bi" #include once "mff/CommandButton.bi" Using My.Sys.Forms Type Form1Type Extends Form Declare Static Sub _cmdShowForm2_Click(ByRef Sender As Control) Declare Sub cmdShowForm2_Click(ByRef Sender As Control) Declare Constructor Dim As CommandButton cmdShowForm2 End Type Constructor Form1Type ' Form1 With This .Name = "Form1" .Text = "Form1" .Designer = @This .SetBounds 0, 0, 350, 300 End With ' cmdShowForm2 With cmdShowForm2 .Name = "cmdShowForm2" .Text = "cmdShowForm2" .TabIndex = 0 .SetBounds 67, 93, 92, 27 .Designer = @This .OnClick = @_cmdShowForm2_Click .Parent = @This End With End Constructor Private Sub Form1Type._cmdShowForm2_Click(ByRef Sender As Control) *Cast(Form1Type Ptr, Sender.Designer).cmdShowForm2_Click(Sender) End Sub Dim Shared Form1 As Form1Type #ifndef _NOT_AUTORUN_FORMS_ #define _NOT_AUTORUN_FORMS_ Form1.Show App.Run #endif '#End Region #include once "Form2.frm" Private Sub Form1Type.cmdShowForm2_Click(ByRef Sender As Control) Form2.Show End Sub
Code: Select all
#ifdef __FB_WIN32__ #cmdline "Form1.rc" #endif '#Region "Form" #include once "mff/Form.bi" #include once "mff/CommandButton.bi" Using My.Sys.Forms Type Form2Type Extends Form Declare Static Sub _cmdShowMsg_Click(ByRef Sender As Control) Declare Sub cmdShowMsg_Click(ByRef Sender As Control) Declare Constructor Dim As CommandButton cmdShowMsg End Type Constructor Form2Type ' Form2 With This .Name = "Form2" .Text = "Form1" .Designer = @This .SetBounds 0, 0, 350, 300 End With ' cmdShowMsg With cmdShowMsg .Name = "cmdShowMsg" .Text = "click me" .TabIndex = 0 .Caption = "click me" .SetBounds 60, 101, 139, 42 .Designer = @This .OnClick = @_cmdShowMsg_Click .Parent = @This End With End Constructor Private Sub Form2Type._cmdShowMsg_Click(ByRef Sender As Control) *Cast(Form2Type Ptr, Sender.Designer).cmdShowMsg_Click(Sender) End Sub Dim Shared Form2 As Form2Type #ifndef _NOT_AUTORUN_FORMS_ #define _NOT_AUTORUN_FORMS_ Form2.Show App.Run #endif '#End Region Private Sub Form2Type.cmdShowMsg_Click(ByRef Sender As Control) MsgBox "It's me - form2" End Sub
Thank you very much for your fast reply. Now it's working like a charm when I start a new project selecting "GUI Application" template.
Although I'm a programmer who like to read all possible documentation, as well examples and like to write code, some questions that are considered "silly or stupid" are useful for beginners. In general, it's completely normal for them to think that an IDE has to do all the basic work. =)
Well, I just have a last question, I promise!
- I open a new project and select "Windows Application"
- A module called "Form1" is created by IDE.
- If I run the project at that stage the compiler show me a Window with "Main Window" caption.
- That window does not appear on Form Designer and, obvously, there's no way to drag any control to it.
So, I ask you: What the purpose of that window or module? What the best practice to create more windows and move on?
Thank you in advanced!
-
- Posts: 59
- Joined: Oct 10, 2015 7:19
- Location: Brazil
Re: VisualFBEditor - IDE for FreeBasic
Hi Mr.Xusinboy Bekchanov,Xusinboy Bekchanov wrote: ↑Jul 23, 2022 15:41Thank you.flaviofornazier wrote: ↑Jul 23, 2022 3:33 Hi all!
Congratulations to the author, co-workers and users of VisualFBEditor.
There:flaviofornazier wrote: ↑Jul 23, 2022 3:33 Could someone please send me a small "Windows Application" project
with only two forms? (e.g. a mainform calling another form).Code: Select all
'#Compile "Form1.rc" #include once "windows.bi" #include once "win\commctrl.bi" Dim MSG As MSG Dim As WNDCLASSEX wc Dim As String NameClass = "MyClass" Dim As HINSTANCE HInst = GetModuleHandle(0) Dim Shared As HWND Form1, Form2 Function WNDPROC(HWND As HWND, MSG As UInteger, WPARAM As WPARAM, LPARAM As LPARAM) As Integer Select Case MSG Case WM_CREATE Case WM_LBUTTONDOWN ShowWindow Form2, SW_NORMAL Case WM_COMMAND Case WM_CLOSE If HWND <> Form1 Then ShowWindow HWND, SW_HIDE: Return 0 Case WM_DESTROY If HWND = Form1 Then PostQuitMessage(0) End Select Return DefWindowProc(HWND, MSG, WPARAM, LPARAM) End Function With wc .cbSize = SizeOf(WNDCLASSEX) .style = CS_HREDRAW Or CS_VREDRAW .lpfnWndProc = @WNDPROC .hInstance = HInst .hIcon = LoadIcon(0, IDI_QUESTION) .hCursor = LoadCursor(0, IDC_ARROW) .hbrBackground = Cast(HBRUSH, COLOR_WINDOW) .lpszClassName = StrPtr(NameClass) .hIconSm = .hIcon End With If RegisterClassEx(@wc) = 0 Then Print "Register error, press any key" Sleep End EndIf InitCommonControls Form1 = CreateWindowEx(0, NameClass, "Main Window", WS_VISIBLE Or WS_OVERLAPPEDWINDOW, 10, 10, 300, 300, 0, 0, HInst, 0) Form2 = CreateWindowEx(0, NameClass, "Second Window", WS_OVERLAPPEDWINDOW, 20, 20, 300, 100, 0, 0, HInst, 0) While GetMessage(@MSG, 0, 0, 0) TranslateMessage(@MSG) DispatchMessage(@MSG) Wend
If you are talking about GUI Application then Avata has already answered you.flaviofornazier wrote: ↑Jul 23, 2022 3:33 I've tried everything, but I always receive the follow error after call
the second form using a command button:
Error: Variable not declared, Form2
I'm sure that I'm missing something...
Thank you in advanced.
You can translate this file into Portuguese:flaviofornazier wrote: ↑Jul 23, 2022 3:33 PS: Mr.Xusinboy Bekchanov, if you intend to add Portuguese language,
please just point me to the right direction and I'll be glad to do it.
There is no a substantial difference between 5th and 9th most commonly
spoken languages. They revolve around 250 millions of speakers.
https://github.com/XusinboyBekchanov/Vi ... nglish.lng
Thank you for your help. I will translate the file to add "Portuguese" language to IDE.
Regards.
Re: VisualFBEditor - IDE for FreeBasic
"Windows Application" in project fold is a templates for who make code with windows API without the MyFbFramework frame. Like the answered by Xusinboy Bekchanov.
Please select "GUI Application" If you want a Form Designer, to drag any control to the forms. This Like my answer and your code need the MyFbFramework frame.
Please select "GUI Application" If you want a Form Designer, to drag any control to the forms. This Like my answer and your code need the MyFbFramework frame.