More Programming Articles Page 10

  • Persistent Objects

    Object data must ultimately be stored in a database. This article shows you how.Persistent Objects In the last couple of articles we have introduced business objects...
  • Factory patterns for menu operations

    In this article I press the Factory pattern into service for menu operations.Are You Being Served? In this article we take a short break from the rigours of...
  • Working with sets of business objects

    In this article I demonstrate one way of working with sets of business objectsThe Needs Of The Many In this article we return to the world of a general purpose object...
  • Implementing sets of objects

    In this article I continue my look at implementing sets of objects.Concise Custom Constructors In my last article I set out the broad principles behind implementing...
  • Standardising application builds

    Philip Brown introduces his column and describes how to ensure your applications are compiled correctly. Standardising Application Builds Hopefully I'll be able to...
  • Adding version information to applications

    This article I will investigate the means by which version information can be made available within an application, writing a class which can be incorporated into any...
  • Tracking Window Numbers in MDI Editors

    Window-handling is important in any complex MDI editor. You need a stable and updated window number list. The default pick-list on the Window menu is unstable if you...
  • Increase Table Updates by 350%

    2 simple lines of code will greatly improve table update speedIf you are doing batch updates like Append, Insert, Delete to a table, Most of you are already using...
  • Refresh your program's frozen form when stopped in the debugger

    How many times have you wished you could see the contents of your program's frozen form when stopped by the degugger? Well, now you can!Nothing is more frustrating...
  • Retrieving selected items in a TListView with MultiSelect on.

    An example of how to retrieve a list of selected nodes within a TListView.var i: Integer; s: string; ls: TListItem; begin ls := ListView1.Selected; // if...
  • Auto-generate implementation wrappers for interface/coclasses

    This article explains a quick and simple method of allowing Delphi to automatically generate implementation wrappers for each interface/coclass you add to a type...
  • Searching for favourites

    Uses TSearchRec to loop through the Explorer favourites, which really are inifiles. Result is beeing placed in HTML and text files.NOTE: This article is a couple of...
  • Selective Tiling in MDI Editors

    The Window/Tile menu item is useful if only two files are open. This code implements a more useful Tile Top 2 of N Windows that doesn't lose other files that may be...
  • Large or small fonts ?

    How to determine if the current machine has large or small fonts installed.Windows settings can come in two flavors, Small Fonts and Large Fonts (found under Control...
  • CRC Error Detection

    A PAINLESS GUIDE TO CRC ERROR DETECTION ALGORITHMS=================================================================== This article has been placed on the web by SPLat...
  • How To access GET / POST request data using Perl

    This article describes how to access data from an HTTP GET / POST Web request using Perl. While there are many Perl modules available (including the CPAN) which...
  • Programming System/Next (Prev) in MDI editors

    How to program the system menu in the MDI child windows of an MDI text editor or textwriter to change Next and Prev from z-stack running to useful writing/editing...
  • Application protection

    How to protect your applications.The perfect application protection system by Vegard A. Larsen I have been thinking about this for a long time, and creating a perfect...
  • Multi threaded timers

    Ever added a TTimer to your application only to find that its event isn't being executed because the main VCL thread is busy?
  • Point in Polygon ?

    How to check if point X,Y is within a polygon.Point in polygon Apparently this solution involves checking how many times you cross a line to pass from point X,Y to the...
  • Relative angle

    How to determine the angle needed to travel from X1,Y1 to X2, Y2.Relative angles Drawing a line from 100, 100 to 200, 200 would mean that you are drawling your line at...
  • Using Microsoft Agent

    This article demonstrates how to implement the Microsoft Agent into your own applications. This article originally appeared in Delphi Developer Copyright Pinnacle...
  • Get CPU ticks

    How to retrieve the number of CPU cycles since the machine was started.CPU Cycles This method of measurement is more finite than milliseconds. function Ticker : DWord;...
  • MultiLine Hints

    A quick tip hot to put more than one line y the hint propertyHere is a quick tip! If you want to have more than a single line hint on a control, for example in a...
  • Get the current user

    How to get the current user's login name.function UserName : String; var Size : DWord; Name : PChar; begin Name := StrAlloc(256); Size := 255; if...
  • Please clean up your space !

    Yes that is a good question. In this short article I will try to motivate programmers to cleanup after their programs. In this short article I will try to motivate...
  • Blending 2 colours

    How to blend 2 TColor's together with a specified strength (Opacity).function BlendColors(Color1, Color2: TColor; Opacity: Byte): TColor; var I :...
  • Cubed root of a number

    As far as I know there is no formula for finding the cube of a number, so here is a good guess algorythm.Pass the number in Number, followed by your Best guess. Your...
  • Read a component as a string

    How to convert any component into a string.function ComponentToString(Component: TComponent): string; var BinStream:TMemoryStream; StrStream: TStringStream; begin ...
  • Fixing TRegistry.DeleteKey

    Microsoft decided to make the registry API work differently on Win9X to WinNT/2000. How nice !Fixing DeleteKey From the WinAPI help on DeleteKey.... Call DeleteKey to...
  • Process Viewer Component

    A Component that shows all running processes, not only on WinNT but also on windows 98/95 ! A Component that shows all running processes, not only on WinNT but also on...
  • Give Your Clients Control of the GUI

    This article demonstrates how users can alter their GUI at runtime.
  • Copy Like Fields from One Table to Another

    How to duplicate data across tables.
  • Semaphores

    Whereas a Mutex may be used to allow only a single instance of your app, a Semaphore can be use to allow a specific number.Creating semaphores A Semaphore is created...
  • Win9x Services

    This article demonstrates how to write a service for Win9XServices One of the most beneficial features on WinNT and Win2000 is the ability to run applications in the...
  • Get windows directory

    How to find the path of the windows directory.function WindowsDirectory : String; var Buffer : Array[0..Max_path] of char; begin FillChar(Buffer,Max_Path + 1, 0); ...
  • Long and short filenames

    How to convert full filename paths. Short filenames converted to Long filename, Long filenames to Short filenames and Mince filenames.When a filename is dropped on a...
  • Get windows temp directory

    How to find the path of the windows temporary directory.function WindowsTemp : String; var Buffer : Array[0..Max_path] of char; begin FillChar(Buffer,Max_Path + 1,...
  • Linking Delphi and Javascript

    How to create an ActiveX and link it to JavaScript in an HTML document.With the Delphi Active Form it is easy to create an ActiveX (OCX) component what can be...
  • Writing HTML help files

    How to write HTML help files for Delphi.Writing HTML Help files by Vegard A. Larsen (originally written for UNDU, the Unofficial Newsletter for Delphi Users, adapted...
  • What is a TFrame ?

    TFrames are like Components (you can place them on the Component Pallet) but are not difficult to create and understand. I will predict that we will see a new business...
  • What does my cursor look like ?

    Recently I needed to render the Screen's Cursor image to a bitmap. This is how to do it.var HCursor: THandle; begin //Get the handle of the current cursor ...
  • Accessing protected properties

    Ever wanted to access the Canvas property of a TPanel. Or any other protected property of a class.Ever wanted to access the Canvas property of a TPanel, or any other...
  • Flicker free drawing

    Flickering is bad, here is how to eliminate it.When creating components, you sometimes need to constantly redraw your component for animation effects etc. The problem...
  • How To Move ANY Visible Component at Runtime

    This code will move any control at runtime, even non TWinControl descendants.Make sure ExtCtrls is in your USES clause. Then set the OnMouseDown event of your controls...
  • Key Database

    Database structure that allows you to securly store keys together with descriptions and other attributes. Key Database The main reason for using key databases is the...
  • 256bit Keys For Strong Encryption

    Techniques for identifying keys that resist brute-force and dictionary attacks. Includes Delphi source for analyzing keys, converting passphrases to keys and permuting...
  • Simplified server-side processing

    RPM simplifies server-side processing for Delphi developersThis article originally appeared in InfoWorld Magazine Copyright InfoWorld Media Group, Inc. Think...
  • Secure Chat

    Textual chat protocol that implements a public-key algorithm in conjunction with an asymmetrical algorithm. Secure Chat This is how this chat protocol goes:...
  • Accessing FoxPro Data Without FoxPro

    This small VFP DLL can help bring the power of Rushmore into non-Rushmore applications. FoxTalk February 1999 Copyright Pinnacle Publishing, Inc. All rights...