More Programming Articles Page 11

  • 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...
  • Help Eliminate DBF Corruption

    Help Eliminate DBF Corruption with a Posting Engine FoxTalk May 1999 Copyright Pinnacle Publishing, Inc. All rights reserved.Help Eliminate DBF Corruption with a...
  • Visual SlickEdit 5.0

    Visual SlickEdit 5.0 takes a bite out of development timeThis article originally appeared in InfoWorld Magazine Copyright InfoWorld Media Group, Inc. If you're...
  • Disable right mouse button

    No right clicking please !<script language="JavaScript1.2"> if (document.all) document.body.onmousedown=new Function("if...
  • Print another page

    When the user prints the page, actually print another page.<head> <link rel=alternate media=print href="http://www.microsoft.com"> </head>
  • Highlight words by clicking them

    How to highlight words by clicking them, and have the list of highlighted words placed into a hidden INPUT within a FORM.<html> <head>   <script...
  • Reading and writing a file to and from a string

    This article inroduces two handy functions for reading the contens of a file in a string and writing a string to a file.Reading a file into a string Perhaps the...
  • Getting the associated icon of a file extension

    This article introduces a function you can use to get the associated icon of a file or document based on its file extension (i.e. it doesn't matter if the file or...
  • Highlighting table cells

    How to highlight cells in a tablefunction changeto(highlightcolor){ source=event.srcElement if (source.tagName=="TR"||source.tagName=="TABLE")...
  • Days since last change

    How long since this page was last altered.<script language=JavaScript>  <!-- Hide  /* This JavaScript is composed by Bart Van Hemelen.  * You can contact...
  • Starting an application as an icon in the system tray

    This article will show you how to start an applicacion minimized with an icon in the system tray (the area at the right of the task bar)PLACING AN ICON IN THE SYSTEM...
  • Making an application run automatically when Windows starts

    Delphi Borland Windows application run automatically start starts startupOne way is placing a direct access to the application in the Startup folder of Windows Start...
  • Accessing the Windows Registry

    This article introduces a couple of handy functions that make it easy to read and write values in the Windows Registry.WHAT IS THE REGISTRY? It is where Windows stores...
  • Determining the associated application

    Knowing the application associated with a given file extension.WHERE IS THAT INFORMATION? The applications associated with the file extensions are stored in the...
  • Meta refresh example

    How to have your page automatically refresh to another page.Look in your HTML source. <HTML>   <HEAD>     ** HERE **   </HEAD> </HTML>...
  • Ownerdrawn menu

    Ownerdrawn menusChange the ownerdraw property of the TMainMenu to True, then for each TMenuItem you want to custom draw mess with OnDrawItem and OnMeasureItem....
  • Dynamic popup menus

    How to dynamically update items of popupmenu ?type TForm1 = class(TForm) PopupMenu1: TPopupMenu; ... procedure FormMouseDown(Sender: TObject; Button:...
  • Is popup menu open ?

    Is popup menu open ?Using the WM_MENUSELECT message of the form won't work to check if the popup is open. Simply because the parent of the popup is not the form (check...
  • Hints for menu items

    How can I create hints for Menu items?On your form, we assume you have a MainMenu and a Statusbar type TForm1 = class(TForm) ... procedure FormCreate(Sender:...
  • Long and short hints.

    What is a long/short hint ?When you set the hint property of a component, you can create it in two parts : The short part|The part that can be longer If you set the...
  • Creating Office menus

    How to Create Office like menu ? Drop down a TControlBar or a TCoolbar. Drop down a TToolBar inside of the TcontrolBar or TCoolbar. Set Flat, and ShowCaptions of the...
  • Moving menus

    How to move a menu ?// The line that follows switch « New » with « Open » in the file menu // Items[0] identifies the first « main » menu (File) // [1]...
  • Menu to the right of the window

    Is the menu to the right of the window ?var MENUITEMINFO: TMENUITEMINFO; Buffer: array[0..79] of Char; // declared in menu.pas. I wonder why 79. begin ...
  • Checked menu items

    How to use my own checkmark for menuitems ?// Use GetSystemMetrics with CXMENUCHECK and CYMENUCHECK to get the size of menu checkmarks ...
  • How do I programmatically drop down a menu ?

    How to drop down a menu through code rather than user interaction. {Alt Key Down} keybd_Event(VK_MENU, 0, 0, 0); {F Key Down - Drops the menu down} ...
  • Disabling system menus

    Disabling/Enabling system menu or minimize/maximize/close button at run-time// Disable BorderIcons := BorderIcons - [biSystemMenu, biMinimize, biMaximize]; // Enable...
  • Is menu open

    How to check if a menu is dropped down or not.type TForm1 = class(TForm) ... private IsMenuOpen: Boolean; procedure WMMENUSELECT(var message: TWMMENUSELECT);...
  • Create and add an menuitem at runtime

    How to create and add a menuitem at runtime ?type TForm1 = class(TForm) ... private procedure MenuClick(Sender: TObject); ... NewMenu := TMenuItem.Create(nil);...
  • How To add items to the system menu

    How to add items to the system menu at the top left of the form.type   TForm1 = class(TForm)   ...     procedure FormCreate(Sender: TObject);   private...
  • Get client IP

    When creating forums, tagwalls and the like it is important to save the IP of the user in case of abuse.Simply insert the following code: IP =...
  • Disable CD AutoRun

    This is an example of how to enable / disable the CD autorun for windows.// declare Registry in your USES clause procedure SetCDAutoRun(AAutoRun:Boolean); const ...
  • RDB$FOREIGN1

    Interbase generates very unfriendly names for constraints. This is a script that will make it generate more friendly ones./* SUGGESTION ABOUT HOW TO CONTROL THE NAMES...
  • Restricting access to the USERS table

    Any user can log in to ISC4.GDB and manipulate data in the USERS table. Here is how to prevent this./* Enhanced security database (isc4.gdb) - version B -it...
  • Populate a dropdown selectbox from DB

    Dynamically populate a dropdown select from a database with unique data. <!--- Select ID & Brand using Distinct to make sure there are no duplicates in the...
  • How To hog the CPU

    This article demonstrates how to assign more / less CPU time to your Delphi application.var   H: THandle; begin   H := GetCurrentProcess();   SetPriorityClass(H,...
  • CD is audio ?

    This article demonstrates how to determine if the CD inserted is an audio CD or not.procedure TForm1.Button1Click(Sender: TObject); var MyDeviceID : MCIDEVICEID; ...
  • Get the cursor image

    How to draw the current cursor onto an image.I once wrote a component which reflected the cursor (looks nice). Obviously I needed to know what the cursor looks like....
  • IFDEF delphi versions

    How to determine the Delphi compiler version using IFDEF statements.{$IFDEF VER80} {$DEFINE Delphi1} {$ENDIF} {$IFDEF VER90} {$DEFINE Delphi2} {$ENDIF} {$IFDEF...
  • Open / close CD drive

    This article demonstrates how to open / close the CD tray in Delphi.uses MMSystem; procedure TForm1.OpenCdTray(AOpen:Boolean); const DoPlay : array[Boolean] of...
  • Get a list of the fields in a table.

    Get a list of the fields in a table. <cfquery name="getFieldNames" datasource="Examples">   select * from thetablename </cfquery>...
  • Is disk in drive ?

    This article shows how to detect if a disk is in the specified drive.function IsDriveReady(Drive: Char): Boolean; begin Result := FileExists(Drive + ':\nul'); end;
  • Determine CPU speed

    This article demonstrates how to detect the MHZ speed of the current CPU.function GetCpuSpeed: Extended; var t: DWORD; mhi, mlo, nhi, nlo: DWORD; t0, t1, chi,...
  • Icon on the desktop

    This article shows how to add a link on the desktop to your application.Adding a link (lnk) to the desktop directory is pretty simple. First we will need to create a...
  • Days in month

    This article demonstrates how to detect how many days there are in a given month.procedure TForm1.Button1Click(Sender: TObject); var MyDate : TDateTime; tmpStr :...
  • Filter HTML tags out of a string.

    A little RegEx Filter out any HTML tags passed in a string.<cfset MyString = REReplace(MyString, "<[^>]*>", "", "All")>...
  • Hash anyone ?

    This article demonstrates a simple hashing algorythm.function HashElf(const Buf; BufSize: Integer): Integer; var Bytes: TByteArray absolute Buf; I, X: Integer;...
  • Accessing ASP objects in Delphi

    This article demonstrates how to use COM to access ASP objects such as Session.1. Create a MTS object (look under the Multitier page in File->New...)2. Name it...
  • Change numbers in a string to asterisks.

    A little regular expression to change all numbers in a string to asterisks. <cfset MyString = REReplace(MYString, [[:digit:]], *,ALL)> Example: <!--- Fill...