Creations built using RJtextEd

Discuss any editing or program related subjects.
User avatar
yereverluvinuncleber
Posts: 243
Joined: 20 Apr 2018 09:49

Re: Creations built using RJtextEd

Post by yereverluvinuncleber » 13 Mar 2019 00:46

My latest offering:

This is to show you how I am using RJTextEd as an adjunct to another tool to implement functionality that an older product does not have.

Image
Fig 1.0 Firestrike Quartermaster VB6 Windows

This is a screenshot of my desktop with some software displayed that I originally wrote in the 90s. It was a military simulation tool that was a very early precursor to tank games such as World of Tanks. Some primitive 3D effects but mostly 2D. Firestrike was designed to be a comprehensive tool to support desktop wargaming tabletop figures and vehicles in 15/20mm to 1/300th scale. The PC program was designed to be a tool for the umpire to determine the outcome of a battle between two opposing armies of up to 1,200 vehicles per side. It had a graphical interface in the days when such things were rare. It aimed to be easy to use and fast to operate. I cut my original Photoshop skills on this software.

I am using the VB6 IDE to update and improve the code but I am continuously using RJTextEd whenever I need capabilities that the VB6 IDE does not have. The VB6 IDE allows you to edit files externally, with an add-on named MZ-tools it also has buttons to enable the current document to be edited using a default editor (RJTe) and the IDE itself is aware of any code-changes made by an external editor, asking if you want to reload the project whenever changes are made.

Image
Fig 2.0 VB6 IDE and RJTe as the external editor during macro changes to the code.

Due to Rickard's recent improvements RJTe has advanced search and replace functionality that is far superior to that of the VB6 IDE. RJTe also has macro capabilities that are just plain missing in VB6 IDE so bulk changes are almost always carried out in RJTe instead. When I wrote this my programming skills were limited and the result is a lot of voluminous replicated code with the usual spaghetti-like structure. I am using RJTextEd's search/replace and macro functions daily to fix my old code. Frankly, I couldn't have done it without it.

Image
Fig 2.1 The VB6 IDE cannot list all search strings, RJTextEd can...

All in all, RJTe is a very useful adjunct to VB6 development.

I am now using three editors:

i. RjTextEd as my main development editor for coding javascript projects for the web and for desktop, also for enhancing VB6 where it falls short.
ii. Context as a quick and fast-initiating editor for quick and dirty editing ( I think of it as RJTextEd lite!)
iii. VB6 as the IDE for BASIC program design and coding.

Why am I coding an old program in an outdated language such as VB6 ? Well, for a start I am loving the old VB6 IDE, it works very well, it is blisteringly fast. I suppose 'puters are SO much faster these days than they used to be. Each core is 10-15 times what I would have used back in the day, yet now I have more than just one CPU core, drives are many times quicker than they used to be and all modern computers have so much more memory. Start-up and compilation times are now measured in seconds rather than minutes and as a result it is a delight to develop and run my old programs. The fact that a programming environment from 1991 is still usable and capable of building decent apps in 2019 is rather impressive. Why Microsoft gave up on VB6 still astounds me as one of its largest corporate failings over the last 30 years. Microsoft have squandered so much that was good and lost a lot of goodwill in the process. The VB6 IDE was superb in its day and despite some limitations (as described above) is still very usable. The VB6 language is very standard, usable and if you were brought up on BASIC it is the ultimate expression of that language just as VB.NET is definitely NOT. Professional programmers often detract from what VB6 really is, what they don't understand is what VB6 is capable of. I think of VB6 as an advanced scripting language with its own IDE which has access to all the facilities of the o/s, through COM/ActiveX and one that is capable of producing compiled binaries. That is a combination that is hard to beat.

This VB6 project was the biggest thing I had ever attempted but just before the turn of the century I abandoned my biggest computing effort of all time solely because Microsoft deprecated the programming environment. They threatened to pull the plug to stop VB6 running on Windows and they provided no possible upgrade path. It was soul-destroying. Instead, I went onto other things and abandoned Firestrike and MS products altogether. If I had known that VB6 would survive as a usable environment despite Microsoft's best efforts to kill it, I might have actually continued the development.

Many years later and the good news (for me) is I have picked it up again!

The program shown above is just part of the whole program. This was an interface to the core databases that stored the vehicle, weapon and gun data allowing you to create an army from any vehicle used during the Normandy campaign of World War II. The work to collate all manner of information on all the combatant's vehicles, to photograph and process all that data and provide it in a usable form was a large amount of work for one man to achieve. Even though I eventually abandoned it, it had one good side effect - it taught me programming.

The VB6 IDE is a nice place to work, however there are limitations of the old VB6 IDE in comparison to RJTextEd.

I have previously mentioned the search not being up to scratch, well it is usable but a bit annoying at times. CTRL+H is used to bring up the search/replace dialog rather than CTRL+R in every other editor I have used. You cannot define key sequences in the VB6 IDE so you cannot redefine set key sequences as you can in RJTextEd. The code is not as actively colour-highlighted as you would expect, the syntax highlighter gives just three variations in colour, black for valid VB6 code, blue for VB6 keywords and green for comments with red reserved for errors. There is no useful line numbering which is strange for a BASIC variant. Line numbering was removed as it used to be part of BASIC's code and was considered a retro feature but the IDE does not provide a replacement line numbering facility so you can't jump to a line of numbered code. A useful feature missing is that branch Lines are not drawn to indicate the start and end of if/then statements.

Using the VB6 IDE has given me some food for thought, it has certainly made me want some of the more desirable functionality that VB6 has, within RJTextEd, I'll have to raise some requests for those.

Open - viewtopic.php?f=6&t=4651
Open - viewtopic.php?f=6&t=4653

Done - viewtopic.php?f=6&t=4399
Done - viewtopic.php?f=6&t=4471
Done -viewtopic.php?f=6&t=4600&p=16207&hilit=vb6#p16207
Done -viewtopic.php?f=6&t=4395&p=15448&hilit=vb6#p15448

RJtextEd also needs a language template for VB6, there is one for VBscript but it is not the same. I may raise that.

-oOo-

I have made progress:

o Added right click menus on two of the main programs
o Added and corrected description data within the gundata file - WIP
o Changed the fonts on all fields in all programs
o Updated the title headers on all programs
o Added improved multiline tooltip functionality
o Rejigged the command screen layout
o Rejigged the battle checklist screen
o Added 'about' windows for two of the main programs
o Changing the method of assigning units to HQs
o Added an infantry section to the expanded detail screen in the inventory
o Updated the data handling tools to allow backups of the data
o Updated the data handling tools to respond to spreadsheet-style commands

o Added an aeroplane section to the expanded detail screen in the inventory.
o improved the logic for handling unit points value calculation.
o Updated the data handling tools adding improved searching.
o Overhauled the points calculation incorporating real-life physical equations for gun power.
kilojoule potential of an AP shot:
kJ = ((0.5 * shellWeightAP) * (shellVelocity ^ 2))/1000

kilojoule potential of an HE shot:
kJ = shellWeightHE * 1.1 ' HEpotential ' 4612kJ per Kg of TNT (1.0)

Amatol TNT * 1.1 ' used as a general HE in WWII
Picratol * 1.16 'Used in armour-piercing shells and bombs as insensitive to shock

o Revised a hundred or so data errors
o Updated the help to reflect the improved look and feel
o Added right click menus to all windows
o Expanded inventory allows drop-down selection of any weapon
o Increased the number of data fields in the vehicle data file
o Added an image view on the inventory expansion window
o Removed the print buttons
o Added new Points Calculator buttons
o Fixed a few bugs in the data handling tools
o Updated the gun descriptions
o Revised the vehicle data using new fields
o Allowed selection of any mounted weapon
o Default weapon correctly identifies.
o Revised British armoured car images added x 20
o Fixed bug in selection of vehicle numbers
o corrected bug in points calculation in summary mode
o Added revised Cromwell/Sherman images added x 10
o Added more gun descriptions x 10
o Fixed the selection of records in the vhcl data tool
o Fixed handling of minimized windows

o Added/replaced 20 or so new British equipment images
o Revised various data problems
o Added German gun data regarding missing velocities
o Fixed even more minor formatting/display bugs
o Added preliminary code for a slider to allow easier selection of vehicles/weapons
o Added some code to determine the current number of elements and to go to the end of the data file
o Tested sub-class code for allowing VB6 to respond to mouse scroll wheel events
o Fixed the layout of a few vehicle types expanded screens

o Completed a functioning slider to the inventory list, adding slider logic to handle the display of elements in 'pages'.
o Completed adding the images for all British ground elements that can be selected
o fixed a few bugs where the incorrect image was being displayed on next/back
o Renamed all controls from the defaults to appropriate names that properly reflect their function
o Recreated and/or added twenty or so of the older British images to raise their quality from poor to reasonable
o Added a missing US AA gun Maxson quad 0.5" AA
o Fixed element slider to reset to position 0 when a new vehicle type is selected
o Recreated and/or added twenty or so of the older US images to raise their quality from poor to reasonable
o Recreated and/or added ten or so of the older German images to raise their quality from poor to reasonable - lots more to add yet
o Fixed a bug regarding addition of flamethrowers to a vehicle's drop-down list
o Added a weapon identifier on each MG
o Added conversion from imperial to metric measurements via tooltips on the inventory screen

Image
Fig 3.0 View of one of the resulting application windows.
Noli pati a scelestis opprimi...

You can find me on Deviantart https://www.deviantart.com/yereverluvinuncleber/gallery/

Post Reply