More Programming Articles Page 4

  • Tips for writing ASP.NET composite controls

    Here are some tips I picked up in a Microsoft newsgroup regarding the creation of composite ASP.NET web controls.1) My composite controls are created based on a...
  • ERROR [HY000] Operation must use an updateable query

    Ever seen this error when trying to update your MS Access database from ASP.NET?When developing a website you may find that everything is working fine, until that is...
  • Dependency problem causes VS compilation to fail

    In Visual Studio I sometimes receive an obscure message about over writing dependant DLL files.Ever seen an error message like this one when trying to compile your...
  • Changing Left and Right channel volumes separately:

    This article describes a simple way to set left and right channel volumes separately.Changing Left and Right channel volumes separately:By : Pooia LalbakhshMS in...
  • Sending HTML emails with Indy

    This example shows how to send HTML emails using Delphi and Indy, with embedded images.uses  idMessage;procedure TForm1.Button1Click(Sender: TObject);var  html:...
  • Postbacks return the user to the top of the page

    Whever a user clicks a button etc which causes a postback, the browser jumps back to the top of the page.Whever a user clicks a button etc which causes a postback, the...
  • Password Authentication

    Password authentication is used in many systems for authenticating the identity of one or both peers of a connection. This paper will help you design more secure...
  • Javascript News Ticker

    Yesterday I posted a simple script describing how you could easily consume an RSS feed on your website. However, just displaying headlines is not so cool. Nein, having...
  • Consuming RSS feeds via Javascript

    This article briefly discusses how to consume an RSS feed via javascript.Consuming an RSS feed via javascript is not particularly difficult. RSS is based on XML and...
  • Multi-threading in .NET: Introduction and suggestions

    Multi-threading in .NET: Introduction and suggestionsMulti-threading in .NET: Introduction and suggestionsOne of the greatest understatements I've heard in a...
  • Ensuring XHTML compliancy in ASP.NET 1.1

    Out of the box, ASP.NET generated HTML doesn't validate too well against XHTML 1.0Out of the box, ASP.NET generated HTML doesn't validate too well against...
  • Fooling VS to develop in http://localhost

    How to trick VS into using http://localhost instead of http://localhost/appnameWhenever you create an ASP.NET project with Visual Studio 2003 it will create the URL on...
  • Fast Refactoring with Castalia

    Refactoring is the process of "improving the design of existing code." Learn how to become a faster and more productive refactorer with Castalia.This is the...
  • COM and Windows Services

    A little tip on using COM with Windows Services.Today I tried accessing an XML document from a Windows service.  When I prototyped my classes using a Windows forms...
  • How To Navigate through your Code Faster

    This article teaches techniques developers can use to navigate code faster and comprehend it better.(Originally published at delphi-expert.com on May 14, 2004) This is...
  • Using try...finally to avoid resource leaks

    This article discusses Delphi's try..finally construct, when to use, and how Castalia makes it easier to use.(Originally published at delphi-expert.com on March 16,...
  • Using try..except to handle errors

    Learn about exceptions and how to write better error handling code. Learn how Castalia can help us write more robust and fault tolerant code.(Originally published at...
  • How To reduce development time by reducing keystrokes

    This article discusses observations on how the most effective developers are able to cut the amount of typing they do nearly in half and gives recommendations on how...
  • How To Reduce Time Spent Finding Errors

    Learn about the various error finding habits of Delphi developers and how you can overcome bad habits to find errors faster and more efficiently(Originally published...
  • How To Automatically Split Temporary Variables in Delphi

    This article discusses proper usage of temporary variables, motivations for splitting improper variables, and how to use Castalia to automatically split them.I would...
  • Tutorial: Write your own FindFiles tool

    How to use FindFirst and FindNext with recursion, for adding filenames and paths to a stringlistHow to create a list of the files in a folder and its subfoldersIn the...
  • Centering an image

    How to centre an absolutely positioned image on a webpage using CSS.The trick is to set the left margin to a negative number, this number should be half of the width...
  • Role based programming in Bold

    An example of implementing the Actor/Role pattern in Bold.Role based programming in BoldBold allows developers to develop OOP applications which persist to a database....
  • How To Make a TEdit numeric

    A small tip showing how to tell windows that your Edit control should only allow numeric entry.If you need a Windows Edit control to only accept valid numbers, but...
  • How To turn <textarea> into a HTML editor

    This free component is so good, not only did I use it but I want to tell you about it too!Turning <TextArea> into a HTML editor I was on IRC a few days ago when...
  • Custom design-time appearance of controls

    How to make a control have a different look at designtime.Somtimes a control needs to appear differently at designtime to how they do at runtime. This different...
  • How To Detect if Diskdrive Contains a Floppy

    This article explains how to detect if a diskette is in the disk drive on NT based systems (w2k, XP)Windows has the habit of requesting the user to insert a floppy....
  • Hiding inherited properties

    How to hide inherited properties in C#When inheriting from another component/control it is sometimes desirable to remove some of the properties you are inheriting from...
  • Adding verbs to a control's design time abilities

    This short example shows how to implement design-time verbs in C#This is achieved with a ControlDesigner, like so public class MyNameSpace.MyControlDesigner:...
  • Access footer or header in DataGrid!

    I got annoyed that I had to use foreach or use the OnItemCreated event to access the footer. If I can just have a simple form where I add rows, I could integrate the...
  • Invoking the windows Browse For Folder dialog

    Borland's SelectDirectory browser is quite ugly, here is how to invoke the Windows one instead.uses ShlObj, ShellAPI; ...... function BrowseForFolder(handle : HWND;...
  • How To Use DNS Blocklists to Detect Spam

    One of the solutions to spam is a -frequent updated- database with IP addresses that appear to misbehave. This database should, preferably, be random accessible at...
  • Persistent derived attributes

    A small example of making derived attributes which are persisted to the database.Persistent derived attributes in Bold Bold's derived attributes are always evaluated...
  • Sending email in ASP.NET

    How to write a "Contact us" form in ASP.NETprivate void SendButton_Click(object sender, EventArgs e) {   if (NameTextBox.Text.Length == 0)...
  • ASP.NET uploaded images as thumbnails

    A short piece of code showing how to accept a HTTP upload of a JPG and save it with different dimensions.//First the code to accept the image private void...
  • How prevent a memory page from caching out

    How to make a memory page not cached outIn the previous article, i showed how to list pages. Modifying the attributes is not a big job, but it seems only to work on...
  • How To Clean up Windows File Cache

    How to clean up windows file cacheTo be honest, i haven't found a nice solution for it, that is: a (combination of) windows api that forces the system to clear the...
  • Listing all memory pages allocated by all accesible processes

    How to list all memory pages allocated by all accesible processesCreate a form with a button and a treeview, name the treeview tvwProcessList. Name the button...
  • How To Create a Pre-Caching System

    This article describes how to monitor a drive and pre-cache small files. This is especially usefull with applications that slowly transport streams, like mp3 players...
  • Windows swap and virtual memory

    An example of how to list process memory, and trick windows not caching out pages.Introduction The windows operating system (mainly talking about NT now, that is:...
  • Routine to update database with objects or lists of objects

    A simple procedure that accepts a list of bold objects and lists to commit to the database.Frequently it is necessary to commit a single object or several objects to...
  • RSA signed INI files

    A full implementation of an RSA signed INI file.A recent task of mine was to create a license file. The goals were that the license file should be easily read as plain...
  • Reading a whole section from an inifile

    How to read a whole section from an INI file.[Script] 1000=DoSomething,1,2 1000=DoSomethingElse,3,4 When using TIniFile.ReadSectionValues only one of these items will...
  • How To Detect the Windows OS Version

    This short function will return what version of windows the application is currently running on.type   TWindowsVersion = (wvWin9x, wvWinNT, wvWin2k, wvWinXP);...
  • ntdll.dbgUserBreakpoint

    How to remove that annoying CPU window.In the initialization section of one of your app's units call PatchINT3. procedure PatchINT3; var NOP : Byte; NTDLL:...
  • Recover a DFM from your EXE

    How to get a DFM back from a delphi compiled EXE.function ExtractDFM(ApplicationName, FormClassName: string): string; var AppHandle: THandle; ResStream:...
  • Detect wether an application is being dubugged or not.

    The following function will detect if the application is being debugged or not. This function will not work on Windows 95. Behaviour of an application could be changed...
  • Get the complete Taskbar System Menu for your Delphi Apps

    Simple code to make your C++ Builder or Delphi app use the 'standard' taskbar system menuSummaryWhen you right-click on C++ Builder/Delphi application's...
  • Class for storing application Info in registry

    Quick tutorial showing how to store info about your application in the windows registry. The class is written so that all applications you ever write will get their...
  • Flash internet HTML coding.

    The flash HTML page script:The following code is the HTML code needed to place a viewable flash document into a web page: <OBJECT...