PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: FBR_IDE a freebasic simple editor.  (Read 2005 times)


  • Junior Member
  • **
  • Posts: 102
Re: a freebasic version of notepad.
« Reply #15 on: April 08, 2021, 07:03:10 AM »

somewhere i found an old project that never got finished, the code is a mess.
but the syntax color highlight works fine.
Maybe it will help you


  • Little Newbie
  • *
  • Posts: 10
Re: FBR_IDE a freebasic simple editor.
« Reply #16 on: April 11, 2021, 10:35:09 AM »

hello jermy and everyone :)

well i made a second version of my text editor (which now i'm trying to make a basic IDE for freebasic from it) instead of "textbox" i use "richtext" component and i downloaded your TLB-IDE and added the parser and you are corrected it works to some extend it colors some freebasic commands like "string text in commas" or "dim" and "function" etc... however the code of the parser is a mess lots of line are commented and it's hard to figure what does what or who is what... i wish to make the parser better that is to color more FB commands and keywords yet it's hard to understand how to do so... i laso don't understand where are the data for the keywords/commands that is uses to color the commands...

i bring you the full code of the parser in the hope that someone can explain to me how to add more keywords to be highlighted - also for some reason i cannot use the tab in the richtext component although i clearly made sure that property "acceptTab" will be set to true... (it worked in the textbox component) - anyway here is the parser full code... any help will be appreciated...




  • Junior Member
  • **
  • Posts: 102
Re: FBR_IDE a freebasic simple editor.
« Reply #17 on: April 11, 2021, 11:27:00 AM »

The code is stripped version of a vb6 program to edit odl files and compile them.
Only the parser and some other small parts of code could be used.
The problem was that vb6 puts everything in a container, completely useless and would have to be completely rewritten.
Now that we no longer use vb6, I no longer need the odl ide.

explain to me how to add more keywords to be highlighted 
Look for
Code: [Select]
' assumes one character long comment
Const COMMENT = "'"

Const DELIMITER = " {}[]()"

Const FUNC_OBJ As String = " ENTRY "
Const KEYWORD_PAD As String = " "     

And for the color's, look for
Code: [Select]
Private Sub Highlight(hEdit As hwnd, SyntaxType As long, StartPos As Long, Length As Long)
    dim cf AS CHARFORMAT2
        cf.cbsize            = sizeof(cf)
        cf.dwMask            = CFM_COLOR
    select case SyntaxType
          case 0             ' ColorComment
              cf.crTextColor = colors.Green ' colors.

afther pressing a dot behind 'colors' you get a drop-down list with built-in colors. 
« Last Edit: April 11, 2021, 11:31:10 AM by jermy »

Jim Dunn

  • Junior Member
  • **
  • Posts: 136
  • Jim Dunn
Re: FBR_IDE a freebasic simple editor.
« Reply #18 on: July 23, 2021, 07:23:21 AM »

NEVERMIND -- figured it out, I'm using CRYPTOMATOR as my X: and it is all CASE SENSITIVE... so I just have to do my FreeBasic compiling down on the C drive.

: )

Attached is a pretty complete Notepad project that should help you.

Hey Paul, when I tried to compile that NOTEPAD... I got this:

Failed Compile (Errors 1  Warnings 0)

Command Line:
D:\Programs\WinFBE_Suite\FreeBASIC-1.07.2-gcc-5.2\fbc32.exe -m "X:\Programming\FreeBasic\Notepad\WinFBE_VD_MAIN.bas" "X:\Programming\FreeBasic\Notepad\TMP9A19.rc" -v -s gui  -x "X:\Programming\FreeBasic\Notepad\Notepad.exe"

FreeBASIC Compiler - Version 1.07.2 (2020-12-25), built for win32 (32bit)
Copyright (C) 2004-2019 The FreeBASIC development team.
target:       win32, 486, 32bit
compiling:    X:\Programming\FreeBasic\Notepad\WinFBE_VD_MAIN.bas -o X:\Programming\FreeBasic\Notepad\WinFBE_VD_MAIN.asm (main module)
assembling:   D:\Programs\WinFBE_Suite\FreeBASIC-1.07.2-gcc-5.2\bin\win32\as.exe --32 --strip-local-absolute "X:\Programming\FreeBasic\Notepad\WinFBE_VD_MAIN.asm" -o "X:\Programming\FreeBasic\Notepad\WinFBE_VD_MAIN.o"
compiling rc:               D:\Programs\WinFBE_Suite\FreeBASIC-1.07.2-gcc-5.2\bin\win32\GoRC.exe /ni /nw /o /fo "X:\Programming\FreeBasic\Notepad\TMP9A19.obj" "X:\Programming\FreeBasic\Notepad\TMP9A19.rc"

Could not open source file (X:\Programming\FreeBasic\Notepad\TMP9A19.RC)
OBJ file not made
compiling rc failed: 'D:\Programs\WinFBE_Suite\FreeBASIC-1.07.2-gcc-5.2\bin\win32\GoRC.exe' terminated with exit code 1
« Last Edit: May 12, 2022, 03:25:43 AM by Jim Dunn »
"Ok, yes... I like pie... um, I meant, pi."
Pages: 1 [2]