BCS Fetch Web Page

There are those times when it is necessary to fetch the HTML of a specified URL.

A 32 bit executable program may be downloaded by clicking here.
A 64 bit executable program may be downloaded by clicking here.
The component documentation can be found by clicking here.
The source code may be found by clicking here.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

BCS Fix FX File Specification

In order to use strings to represent file specs in Java and c++ the back slash indicated the beginning of the escape sequence.  The double back slash indicates no escape sequence and the single back slash is interpreted.
This application takes care of file specification to be used in Java and c++ and places the results on the clipboard for subsequent use.

A 32-bit executable program may be down loaded by clicking here.
A 64-bit executable program may be down loaded by clicking here.
The component documentation can be found by clicking here.
The source code may be found by clicking here.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

BCS Clone A Unit

Occasionally a Delphi unit may require cloning and creation of a new unit at an alternate location (or in the original location).   This utility will clone a Delphi unit and create a new unit from the clone.

When the user clicks the Generate Unit option the following dialog will appear.

Traverse the dialog and select the desired input file.

Next, the user should select the folder where the output should be placed.

After the user supplies the output folder a unit name is required.

After the unit name is supplied, the new unit is generated.  The only exception is if the newly created unit is already at the output location.

After clicking on the OK option the user has the opportunity attempt generating the new unit with a different name or a different location.

A 32-bit executable program may be downloaded by clicking here.
A 64-bit executable program may be downloaded by clicking here.
The component documentation can be found by clicking here.
The source code may be found by clicking here.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

BCS Remove Hard Disk Content On DVD

Once files are safely stored on DVD they are no longer needed on the hard drive.  This utility searches the hard disk for file names matching on the DVD.  If a match is found the file on the hard drive is deleted.

dhd01

When the user clicks on the Check DVD option the following dialog appears.

dhd02

Select the hard drive directory to compare and the utility will delete all files which exists on the DVD.

A 32-bit executable program may be downloaded by clicking here.
A 64-bit executable program may be downloaded by clicking here.
The component documentation can be found by clicking here.
The source code may be found by clicking here.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

BCS Data Element Display Label

Each data element has an associated display label.  This application allows the user to update the display label.

dedn01

When the DED Data Entry option is selected the following dialog appears allowing the user to select an existing database and table.

dedn02

Simply double click on the desired data alias and table name to select it.  Once selected the following dialog will appear.

dedn03

The above dialog lists all the data element names for the selected alias and table.  To reveal the display label value simply click on the desired data element name.

dedn04

Simply key in the display label for the data element.  Exit the application by either selecting the exit option or clicking on the “X” in the application menu.

The database structure is listed below.

-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 19, 2016 at 10:17 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
 
51&q=SET&lr=lang_en">SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
51&q=SET&lr=lang_en">SET time_zone = "+00:00";
 
 
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
 
--
-- Database: `de`
--
 
-- --------------------------------------------------------
 
--
-- Table structure for table `dl`
--
 
51&q=CREATE&lr=lang_en">CREATE 51&q=TABLE&lr=lang_en">TABLE `dl` (
  `id` 51&q=INT&lr=lang_en">int(11) 5.1/en/non-typed-operators.html">NOT 51&q=NULL&lr=lang_en">NULL,
  `dna` 51&q=VARCHAR&lr=lang_en">varchar(75) 5.1/en/non-typed-operators.html">NOT 51&q=NULL&lr=lang_en">NULL,
  `lab` 51&q=VARCHAR&lr=lang_en">varchar(125) 5.1/en/non-typed-operators.html">NOT 51&q=NULL&lr=lang_en">NULL
) 51&q=ENGINE&lr=lang_en">ENGINE=51&q=INNODB&lr=lang_en">InnoDB 51&q=DEFAULT&lr=lang_en">DEFAULT 51&q=CHARSET&lr=lang_en">CHARSET=latin1;
 
--
-- Indexes for dumped tables
--
 
--
-- Indexes for table `dl`
--
51&q=ALTER&lr=lang_en">ALTER 51&q=TABLE&lr=lang_en">TABLE `dl`
  51&q=ADD&lr=lang_en">ADD 51&q=PRIMARY%20KEY&lr=lang_en">PRIMARY KEY (`id`);
 
--
-- AUTO_INCREMENT for dumped tables
--
 
--
-- AUTO_INCREMENT for table `dl`
--
51&q=ALTER&lr=lang_en">ALTER 51&q=TABLE&lr=lang_en">TABLE `dl`
  51&q=MODIFY&lr=lang_en">MODIFY `id` 51&q=INT&lr=lang_en">int(11) 5.1/en/non-typed-operators.html">NOT 51&q=NULL&lr=lang_en">NULL 51&q=AUTO_INCREMENT&lr=lang_en">AUTO_INCREMENT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

A 32-bit executable program may be downloaded by clicking here.
A 64-bit executable program may be downloaded by clicking here.
The component documentation can be found by clicking here.
The source code may be found by clicking here.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

BCS Tidy Menu Items

The menu system contains numerous entries and this section of BCS Tidy orders those entries in ascending alphabetical sequence.

tim01

The input appears below.

{*-----------------------------------------------------------------------------
 Procedure: OnMenuClick
 Author:    Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC
 Date:      04-May-2016
 @Param     Sender: TObject
 @Return    None
 -----------------------------------------------------------------------------}
procedure TBCSMenu.OnMenuClick(Sender: TObject);
var
  buf: string;
  x: Integer;
begin
  With Sender as TMenuItem do
  begin
    buf := name;
    buf := buf;
  end;
  if buf = 'muiExit' then
  begin
    BCSMenuc.Close;
  end;
  if buf = 'muiGenMenuItem' then
  begin
    cgeMenuItem;
    buf := buf;
  end;
  if buf = 'muiGenMenuClick' then
  begin
    cgeMenuXqt;
    buf := buf;
  end;
  if buf = 'muiPutExeToClipboard' then
  begin
    cgeGenXQT;
  end;
  if buf = 'muiCallProcedure' then
  begin
    cgeCallProc;
    buf := buf;
  end;
  if buf = 'muiProcedureDefinition' then
  begin
    cgeProcDef;
    buf := buf;
  end;
  if buf = 'muiProcedureBlock' then
  begin
    cgeProcBlock;
    buf := buf;
  end;
 
  if buf = 'muiFonts' then
  begin
    dlgFont.Execute(BCSMenuc.Handle);
    defFont := dlgFont.Font;
    for x := 0 to (BCSMenuc.ComponentCount - 1) do
    begin
      if (BCSMenuc.Components[x] is TDBEdit) or
        (BCSMenuc.Components[x] is TDBGrid) or (BCSMenuc.Components[x] is TDBMemo)
        or (BCSMenuc.Components[x] is TDBText) or
        (BCSMenuc.Components[x] is TComboBox) or (BCSMenuc.Components[x] is TEdit)
        or (BCSMenuc.Components[x] is TLabel) or
        (BCSMenuc.Components[x] is TListBox) or (BCSMenuc.Components[x] is TMemo)
      then
        TButton(BCSMenuc.Components[x]).Font := defFont;
    end;
  end;
  if buf = 'muiColors' then
  begin
    dlgColors.Execute(BCSMenuc.Handle);
    defColor := dlgColors.Color;
  end;
  if buf = 'muiHelp' then
  begin
    XQT('http://bcsjava.com/doc/app/BCS%20BCSMenu%20Base%20Dialog.htm', '', '');
  end;
  if buf = 'muiStyles' then
  begin
    frm001c.frmShowModal
  end;
end;

The sorted output is listed below.

{*-----------------------------------------------------------------------------
 Procedure: OnMenuClick
 Author:    Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC
 Date:      04-May-2016
 @Param     Sender: TObject
 @Return    None
 -----------------------------------------------------------------------------}
procedure TBCSMenu.OnMenuClick(Sender: TObject);
var
  buf: string;
  x: Integer;
begin
  With Sender as TMenuItem do
  begin
    buf := name;
    buf := buf;
  end;
  if buf = 'muiCallProcedure' then
  begin
    cgeCallProc;
    buf := buf;
  end;
  if buf = 'muiColors' then
  begin
    dlgColors.Execute(BCSMenuc.Handle);
    defColor := dlgColors.Color;
  end;
  if buf = 'muiExit' then
  begin
    BCSMenuc.Close;
  end;
  if buf = 'muiFonts' then
  begin
    dlgFont.Execute(BCSMenuc.Handle);
    defFont := dlgFont.Font;
    for x := 0 to (BCSMenuc.ComponentCount - 1) do
    begin
      if (BCSMenuc.Components[x] is TDBEdit) or
        (BCSMenuc.Components[x] is TDBGrid) or (BCSMenuc.Components[x] is TDBMemo)
        or (BCSMenuc.Components[x] is TDBText) or
        (BCSMenuc.Components[x] is TComboBox) or (BCSMenuc.Components[x] is TEdit)
        or (BCSMenuc.Components[x] is TLabel) or
        (BCSMenuc.Components[x] is TListBox) or (BCSMenuc.Components[x] is TMemo)
      then
        TButton(BCSMenuc.Components[x]).Font := defFont;
    end;
  end;
  if buf = 'muiGenMenuClick' then
  begin
    cgeMenuXqt;
    buf := buf;
  end;
  if buf = 'muiGenMenuItem' then
  begin
    cgeMenuItem;
    buf := buf;
  end;
  if buf = 'muiHelp' then
  begin
    XQT('http://bcsjava.com/doc/app/BCS%20BCSMenu%20Base%20Dialog.htm', '', '');
  end;
  if buf = 'muiProcedureBlock' then
  begin
    cgeProcBlock;
    buf := buf;
  end;
 
  if buf = 'muiProcedureDefinition' then
  begin
    cgeProcDef;
    buf := buf;
  end;
  if buf = 'muiPutExeToClipboard' then
  begin
    cgeGenXQT;
  end;
  if buf = 'muiStyles' then
  begin
    frm001c.frmShowModal
  end;
end;

 

 

A 32-bit executable program may be downloaded by clicking here.
A 64-bit executable program may be downloaded by clicking here.
The component documentation can be found by clicking here.
The source code may be found by clicking here.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

BCS Tidy Class Sort

The BCS Tidy Application has a utility to sort the Delphi class.

cla01

The unsorted class is represented below.

/// Main Class
  Tfrm017 = class(TCustomForm)
 
  private
    procedure estMainMenu;
    procedure estStatus(pan1, pan2, int: Integer);
    procedure estWindow(top, width, height: Integer; Caption: string);
    procedure OnMenuClick(Sender: TObject);
    procedure OnTimer(Sender: TObject);
    procedure XQT(cmd, parm, defPath: string);
    procedure btnSaveClick(Sender: TObject);
    procedure btnClick(Sender: TObject);
    procedure WebBrowser1DocumentComplete(ASender: TObject;
      const pDisp: IDispatch; const rURL: OleVariant);
    procedure URLClick(Sender: TObject);
    procedure URLKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
    procedure broNavigateComplete2(ASender: TObject; const pDisp: IDispatch;
      const URL: OleVariant);
 
  public
    procedure WebBrowser1DocumentComplete(ASender: TObject;
      const pDisp: IDispatch; const rURL: OleVariant);
    procedure frmShowModal();
    procedure broNavigateComplete2(ASender: TObject; const pDisp: IDispatch;
      const URL: OleVariant);
 
  end;

The re-ordered class statement appears below.

/// Main Class
  Tfrm017 = class(TCustomForm)
 
  private
    procedure broNavigateComplete2(ASender: TObject; const pDisp: IDispatch;
      const URL: OleVariant);
    procedure btnClick(Sender: TObject);
    procedure btnSaveClick(Sender: TObject);
    procedure estMainMenu;
    procedure estStatus(pan1, pan2, int: Integer);
    procedure estWindow(top, width, height: Integer; Caption: string);
    procedure OnMenuClick(Sender: TObject);
    procedure OnTimer(Sender: TObject);
    procedure URLClick(Sender: TObject);
    procedure URLKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
    procedure WebBrowser1DocumentComplete(ASender: TObject;
      const pDisp: IDispatch; const rURL: OleVariant);
      const URL: OleVariant);
 
  public
    procedure broNavigateComplete2(ASender: TObject; const pDisp: IDispatch;
      const URL: OleVariant);
    procedure frmShowModal();
    procedure WebBrowser1DocumentComplete(ASender: TObject;
      const URL: OleVariant);
 
  end;

The ordering of the class is accomplished by collecting the associated blocks of code and providing a mechanism to sort procedure name in an ascending alphabetical sequence and merge the results (in place) to the Delphi source code.  This is accomplished by using sorted string lists.

A 32-bit executable program may be downloaded by clicking here.
A 64-bit executable program may be downloaded by clicking here.
The component documentation can be found by clicking here.
The source code may be found by clicking here.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

BCS Tidy Format Uses Statements

The BCS Tidy project is an ongoing effort to develop a source code restructuring application.  This particular utility sorts and reformats uses statements.

The unsorted uses statement is shown below.

uses frm001u, Graphics, SHDocVw, System.Classes, System.Types,
  System.IOUtils,
  Vcl.Buttons, Vcl.Controls, Vcl.ComCtrls, Vcl.DBCtrls, Vcl.DBGrids,
  Vcl.Dialogs, Vcl.ExtCtrls, Vcl.Forms, Vcl.Menus, Vcl.StdCtrls, SysUtils,
  Winapi.ActiveX, Winapi.ShellAPI, Winapi.Windows, Winapi.Messages;

When the application is invoked the output uses statement appears below.

uses frm001u, Graphics, SHDocVw, System.Classes, System.IOUtils, System.Types, 
  SysUtils,Vcl.Buttons, Vcl.ComCtrls, Vcl.Controls, Vcl.DBCtrls, Vcl.DBGrids, 
  Vcl.Dialogs,Vcl.ExtCtrls, Vcl.Forms, Vcl.Menus, Vcl.StdCtrls, Winapi.ActiveX, 
  Winapi.Messages,Winapi.ShellAPI, Winapi.Windows;

This utility can be used for any Delphi source code uses statement.

A 32-bit executable program may be downloaded by clicking here.
A 64-bit executable program may be downloaded by clicking here.
The component documentation can be found by clicking here.
The source code may be found by clicking here.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

BCS Remove Info Stored On DVD

When information is successfully stored on a DVD that information no longer needs to exist on the hard disk.  This application removes that content.

dfd01

You may initially desire to identify which DVD device as  the subject of subsequent operations.  The following dialog will appear.

dfd02

The normal process is initiated when the Check DVD option is invoked.

dfd03

The selected directory is used for further queries.  When identical folders are found the folders residing on the hard disk are removed.

A 32 bit executable program may be downloaded by clicking here.
A 64 bit executable program may be downloaded by clicking here.
The component documentation can be found by clicking here.
The source code may be found by clicking here.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

BCS frm017 Save CC HTML To Text

When the application is initiated click on the URL to surf to the first page.

ccpa02

When the user clicks on the Save To File option the following dialog will appear. Simply select the folder to hold the saved content.

ccpa03

After the folder is select the following dialog may appear if the folder is not empty.

ccpa04

When the user Selects the Yes option all the existing files in that folder are deleted. Be sure and take care using this option.

The next dialog to appear prompts the user for a family identifier.

ccpa05

Typicality the user types in a file prefix. I sometimes use my initials and my response would be “amb” (minus quotes).

The first file was saved. Next click on the “2” option (minus double quotes). After the page changes click on the Save To File Option to save the second file. This process is repeated until there are no more pages to save.

A 32 bit executable program may be downloaded by clicking here.
A 64 bit executable program may be downloaded by clicking here.
The component documentation can be found by clicking here.
The source code may be found by clicking here.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.