gbForumCode is a freeware tool for posting syntax highlighted source code into the PowerBASIC forums. It's built-in syntax highlighting source code editor and compilation options ensure that what you see is what you get when the encoded source code is transferred to the PowerBASIC forums and that users can compile your code!
Simplicity, ease of use, and support of key features were the design goal for gbForumCode - minimizing the interface and the actions required to use the application, but with enough capability to give users the features they need.
To install, simply unzip the installation file (gbForumCode.zip) in a folder of your choice. In addition to the EXE, the installation provides gbForumCode source code, resource file, and image files.
By default the gbForumCode main screen looks like this, with all options visible on the toolbar.
gbForumCode also offers a "mini-mode", for a reduced footprint as shown in this next image.
Download (v3.0, 300K) |
Key Features gbForumCode provides a wide range of features, all focused on making it easier to place syntax highlighted code into the PowerBASIC forums. The included syntax highlighting editor in gbForumCode ensures that what you see is what you post. The compilation feature ensures that what you post can be compiled by forum users.
Other available features/options include:
|
gbForumCode saves it's last used size/location, and will restore it when the application is restarted.
Existing source files (*.bas and *.inc) files can be opened, but to ensure protection of user source code no Save option is provided.
However, any code in the editor is saved (to a temporary file) when gbForumCode closes, and restored when it is restarted. You can optionally have gbForumCode load (at startup) whatever is on the clipboard.
Code may be compiled (using the PowerBASIC compiler) from directly within gbForumCode. This will ensure that your posts contain valid code. You can also open the code within your default *.bas editor, or run the EXE that results from compilation.
Two text data files are used to stored a list of recognized PowerBASIC keywords and Windows API functions - gbforumcode_key.txt and gbforumcode_api.txt. Users may edit these files as desired. You can optionally highlight the procedures (Sub, Function, ...) found within the code.
There are no "Are you sure?" prompts. If you press the clear or other toolbar buttons which modify the editor content or color/font settings, action is taken without the user being prompted for approval.
In mini-mode, the toolbar is reduced to this:
Here are the toolbar options:
Open | Opens and existing *.bas or *.inc file | |
Clear | Clears the editor of all text | |
Cut | Cuts selected text from the editor | |
Copy | Copies selected text to the clipboard | |
Paste | Paste text from the clipboard to the editor | |
Delete | Deletes selected text from the editor | |
CopyV | Copies vBulletin encoded source code to the clipboard | |
View | Opens Notepad to display the vBulletin encoded source code | |
View | Compile the code and view the compiler log (optional) | |
Style | Determines the way in which source code is displayed (lower/mixed/upper) | |
Custom | Allows independent assignment of case style for Keywords and API | |
Font | Allows the user to select a font name, font size, and font attributes | |
Default | Restores default colors to the editor or, using dropdown menu, selects syntax highlighting colors | |
Color | Selects the display color for each source code element. There is one colored button for each source code element (Keyword, Remark, Symbol, Number, Assembler, Quote, and API). The buttons are colored with the current color of their corresponding source code elements. | |
Help | Opens the gbForumCode home page |
When TopMost on Startup is enabled, gbForumCode will be set as TopMost when it starts, regardless of whether Set As TopMost is enabled. The Set As TopMost option is used to turn the topmost setting on/off at any time during a session.
Other features are available by pressing the down arrow on the toolbar Test button:
The default compiler and include paths are:
c:\pbwin90\bin\pbwin.exe
c:\pbwin90\api
So, for point sizes of 10 or less, gbForumCode uses size=0 encoding (normal size). For points sizes of 11-14, gbForumCode uses size=1 encoding. All larger point sizes are encoded as size=2.
Optionally, gbForumCode can be set to provide no font information, allowing the post to take on the default font values of the forums.
Comments and suggestions are welcome!