WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)

User projects written in or related to FreeBASIC.
Post Reply
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.0.8 January 17, 2023)

Post by PaulSquires »

If you are a WinFBE Editor user and would like to try out a print preview class that works well within the WinFBE environment, then please head on over to this topic at the planetsquires forum:

https://www.planetsquires.com/protect/f ... pic=4707.0

...or go directly to the Github page at:

https://github.com/PaulSquires/CPrintPreview

This class is a work in progress and will be changed/enhanced based on feedback.

The latest version of the WinFBE Editor does not (yet) have José's latest version of his WinFBX library and recently José made a small change to the CPrint.inc file that affects the CPrintPreview class. You can simply modify the CPrint.inc file (found in the inc/Afx folder off of the toolchain folder).

Around line 442, make sure the line reads:
pd.DesiredAccess = PRINTER_ACCESS_USE

Rather than:
pd.DesiredAccess = PRINTER_ALL_ACCESS
xiaoyao
Posts: 121
Joined: May 05, 2020 2:01

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.0.8 January 17, 2023)

Post by xiaoyao »

very good ,my second project

how to support unicode for clipboard?
and does it have chinese language version ide?
And the code does not support Chinese input, nor can you paste the Chinese code.

Code: Select all

  Dim As Integer foo
  PRINT("Line 1")
  PRINT("Tine 2")
  PRINT("Tine 3")
  Do '????????????,???????
      foo = GetKey
      Select Case foo
          Case 13
              Print
          Case 19455 '??? ?
              Locate CsrLin, Pos -1
          Case 19967 '??? ?
              Locate CsrLin, Pos + 1
          Case 18687 '??? ?
              Locate CsrLin -1, Pos
          Case 20735 '??? ?
              Locate CsrLin + 1, Pos
          Case Else
              Print Chr(foo);
      End Select

  Loop
frst project:
print("abc")
sleep 20000

Code: Select all

  Dim As Integer foo
  Do '下面是演示控制台流程代码,对按键产生反应
      foo = GetKey
      Select Case foo
          Case 13
              Print
          Case 19455 '方向键 左
              Locate CsrLin, Pos -1
          Case 19967 '方向键 右
              Locate CsrLin, Pos + 1
          Case 18687 '方向键 上
              Locate CsrLin -1, Pos
          Case 20735 '方向键 下
              Locate CsrLin + 1, Pos
          Case Else
              Print Chr(foo);
      End Select
  Loop


Last edited by xiaoyao on May 16, 2023 6:36, edited 1 time in total.
xiaoyao
Posts: 121
Joined: May 05, 2020 2:01

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.0.8 January 17, 2023)

Post by xiaoyao »

I design a form, the results do not know how to display,run exe to show form1

Best like VB6, open to prompt which project examples to create
Or just display a form designer and press F5 to run it

[*]

Code: Select all

form1.ShowDialog
'form1.show
Function Form1_Click( ByRef sender As wfxForm, ByRef e As EventArgs ) As LRESULT
   Function = 0
End Function
xiaoyao
Posts: 121
Joined: May 05, 2020 2:01

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.0.8 January 17, 2023)

Post by xiaoyao »

no sample about standard dll?

Code: Select all

[export]
 public function Add(byval a as Long ,b as Long ) as long 
   Add=a+b
end function
make dll :
public function Add(byval a as Long ,b as Long ) as long Export
Add=a+b
end function
Function Fun1() As Long Export '
Fun1=1234
end function
Function Fun2() As Long
Fun2=3344
'not Export
end function

ADD@8
FUN1@0
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)

Post by PaulSquires »

Download link: https://github.com/PaulSquires/WinFBE/releases

Version 3.1.0 (June 4, 2023)
- Updated included FreeBasic Compiler to version 1.10 (located in toolchain: "FreeBASIC-1.10.0-winlibs-gcc-9.3.0").

Editor:
- Fixed "Quick Run" bug for non-Latin text (eg. Chinese) where editor text was not correctly converted to unicode text.
- Changed "Quick Run" to save to UTF-8 encoded file rather than UTF-16.
- Added recognize VAR keyword in parser for dimension variables in order to popup codetips (same behaviour as DIM and REDIM).
- Updated WinFBX library source files to the latest version per Jose Roca's Github.
coderJeff
Site Admin
Posts: 4323
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)

Post by coderJeff »

PaulSquires wrote: Jun 04, 2023 21:36 Version 3.1.0 (June 4, 2023)
- Updated included FreeBasic Compiler to version 1.10 (located in toolchain: "FreeBASIC-1.10.0-winlibs-gcc-9.3.0").
Very nice! Thank-you.

1) download and unpack
2) run WinFBE32.exe or WinFBE64.exe
3) press CTRL+N for new source file
4) type some code ... maybe 'print "hello"' + ENTER + 'sleep'
5) CTRL+SHIFT+F5 to run the code

So good!
xiaoyao
Posts: 121
Joined: May 05, 2020 2:01

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)

Post by xiaoyao »

preadsheetML,Excel Open XML,Creating Excel WorkBooks without Automation
https://www.planetsquires.com/protect/f ... pic=3208.0

DOES IT SUPPORT WINFBE?
Can you develop a DLL for VB6 use? Standard DLL format or COM DLL format? Or write all your code in VB6


I thought about using COM automation but is seems so slow and at times unreliable if an instance fails or goes screwy under Windows.

I looked at the current Excel Open XML format. Very powerful but somewhat complicated and requires the resulting files to be compressed (zip format) into an .xlsx file.

My research allowed me to stumble on the Excel 2003 XML format (SpreadsheetML). I can't believe that we as a PowerBasic community have not written code for this before. It is pretty easy to create the XML files and incredibly fast.

The reason for this post is to let you know that I have a class to handle all of this stuff just about complete. It will allow us to output our data into Excel ready files.... no more .CSV files!

Here is what the class does so far:

- Create Workbooks with as many Worksheets in them that you wish.
- Rows up to 1,000,000 and columns to 16,000 (that is the current Excel limits).
- Create default style for the entire Workbook but still allow individual cells to have their own styles.
- Styles include things like: Font names, font size, font color, bold, underline, italic, background cell colors, borders (left/right/top/bottom), text and number alignment (left/right/center).
- Cells can be spanned across as many columns as you wish. For example, you can span four columns and center the text.
- Formulas. That's right, embed formulas directly into your file. Stuff like =SUM(A1:A3) is easy.
- Fast! Create 100,000 cells in 0.28 seconds and then write them to the XML file in 2.56 seconds... and that is not even optimized fully yet.

I still have a few things left to write like allowing setting the printer and print preview settings directly in your file. I will be testing the class this week in my application and then I'll post it here for you guys. Maybe not the source code but at least an SLL.
xiaoyao
Posts: 121
Joined: May 05, 2020 2:01

Re: WinFBE FreeBASIC Editor for Windows

Post by xiaoyao »

PaulSquires wrote: Nov 27, 2016 13:25 Thanks VANYA,

You should be able to enable unicode editing (UTF8) by doing this:

"View" menu, "Environment Options", "Enable unicode (UTF-8 encoding)".

It can also be enabled by clicking the 5th panel in the bottom StatusBar. That will toggle between ANSI and UTF-8. Clicking the StatusBar panels is a fast way to perform various actions like switching between CONSOLE and GUI, Goto Line, switch compilers, or define the source file type.
need set default as utf8 format.

and ide need default show a form support demo project
Josep Roca
Posts: 564
Joined: Sep 27, 2016 18:20
Location: Valencia, Spain

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)

Post by Josep Roca »

> I can't believe that we as a PowerBasic community [...]
> Maybe not the source code but at least an SLL.

Apparently you haven't realized that this is the FreeBasic forum, not the PowerBasic forum.
xiaoyao
Posts: 121
Joined: May 05, 2020 2:01

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)

Post by xiaoyao »

Josep Roca wrote: Jun 26, 2023 9:36 > I can't believe that we as a PowerBasic community [...]
> Maybe not the source code but at least an SLL.

Apparently you haven't realized that this is the FreeBasic forum, not the PowerBasic forum.
The previous reading and writing of EXCEL by POWERBASIC is also the code written by the developer of this IDE. He is familiar with this piece, so I would like to ask if there is also a freebasic version of the module code for reading and writing XLS tables
rcarabaj
Posts: 2
Joined: Jul 17, 2023 19:30

Error cannot compile - the program is now running in WINFBE

Post by rcarabaj »

Hello:

I apologize if my question is trivial, but I'm new and trying to understand WINFBE. I get an error that says

cannot compile - the program is now running

but the case is that nothing is running, I am in the Form visual designer. I would appreciate if you can tell me what to do.

Thanks very much, Best regards
paul doe
Moderator
Posts: 1732
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: Error cannot compile - the program is now running in WINFBE

Post by paul doe »

rcarabaj wrote: Jul 17, 2023 19:37 Hello:
...
Welcome to the forum. As you can see, I have moved your post to this topic, which is where questions about WinFBE are usually resolved. This is because you'll have a better chance for an answer here, since Paul is probably subscribed to this topic and he'll get notifications every time somebody posts here.

So, have fun and enjoy your stay.
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: Error cannot compile - the program is now running in WINFBE

Post by PaulSquires »

rcarabaj wrote: Jul 17, 2023 19:37 cannot compile - the program is now running

but the case is that nothing is running, I am in the Form visual designer. I would appreciate if you can tell me what to do.
Sounds like you have a version of your program still in memory from a previous compile/run. Press Ctrl+Alt+Del and run Task Manager. Scan the list for the EXE of your program, highlight/select it, and then press the "End Task" button.
deltarho[1859]
Posts: 4305
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)

Post by deltarho[1859] »

@rcarabaj

If a GUI build is used, which is what you doing using the designer, and we use Print then we will get into trouble because a console has not been opened and we'll have to 'End Task' in the Task Manager.

That will never happen is you ensure that the first code line is '#Console On. If you do not need a console then you can simply prefix with another comment character. This is very handy with a Copy/Paste from the forum, where you may not know whether a console is needed or not.

I often open a console with GUIs to print values for debugging purposes. With release code, I disable '#Console On with ''#Console On and leave it there should, I require it again.

Another tip. If you have a resource file, you can add it to your binary with something like '#Resource "Encrypternet.rc" at the top of your code.
Last edited by deltarho[1859] on Jul 20, 2023 7:47, edited 1 time in total.
rcarabaj
Posts: 2
Joined: Jul 17, 2023 19:30

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)

Post by rcarabaj »

Thanks very much for the help!! :)
Post Reply