Tag

delphi

  • Total Source Code 33
  • Total Page : 2
  • You currently on page number : 1

Try Command

  • 00 0000
  • 249
  • Delphi, Delphi Programming, Basics, Keyword, Command, Try, RTL

The Try keyword is used to mark the start of a block of statements that have error trapping. If an error occurs, the program is not terminated. Instead, control is passed to either a Finally or Except section. Try is used in a number of ways. Version 1 In a Try-Finally construct, the Finally statement is guaranteed to be executed absolutely regardless of what happens in the Try Read more


Boolean

  • 00 0000
  • 334
  • Delphi, Delphi Programming, Basics, Keyword, Command, Boolean, RTL

The Boolean type provides an enumeration of the logical True and False values. syntax : type Boolean = (False, True); Unlike other languages, it is not a number - it will only allow these values. This makes the code much more reliable. Using calculations to test for true or false is a C like practice, but is supported in Delphi. Use the following to hold such a logical Read more


Alpha Control

  • 00 0000
  • 211
  • delphi,aplha skin, control, theme, skin

Easy skinning of existing projects Application appearance is independent from Windows OS version Controls inherits all standard features and possibilities A lot of free and ready to use high-quality skins Over 90 own controls which have standard behaviour, optimized for using with skins and have own additional features Skinning of standard and 3rd-party components (list of Read more


A Delphi Basics Game Database - AQA Computing CPT6 Module - Delphi Source Code

  • 00 0000
  • 240
  • applications,code,sample,delphi,source,game,database

This project is a source code example of an A* A-Level project for the AQA Computing CPT6 practical module. Project Features: Full database manipulationAdd recordDelete recordSave recordSave record fileValidationLogin system [with different levels of access]Report printing featuresDatabase backup featuresSearch and Sort features.Bubblesort and automatic searchAll coded in Delphi with no use of Read more


Delphi Example Code

  • 00 0000
  • 257
  • Delphi examples, source code, applications, collection of Delphi examples, del123, project files

Collection of Delphi examples and applications with all the Delphi examples on our website. Full Delphi source code and project files. Over 50 examples such as: DatabaseReportingOpenGLClasses and ObjectsFile manipulationThreadsFiremonkey examplesIndy examplesand Read more


Simple Graph Component

  • 00 0000
  • 169
  • delphi,graph,cart,simple graph

TSimpleGraph is a visual component, which provides a simple user interface for drawing graphs. The control and its graph objects are fully customizable in the way that let you create almost any kind of graphs.Currently the control has seven node objects for basic geometric shapes: Triangle, Rhomboid, Rectangle, Round Rectangle, Pentagon, Hexagon, and Ellipse. Of course, by sub classing a Read more


Diagram Studio

  • 00 0000
  • 246
  • VCL,.NET,GRID,PLANNER,SCHEDULING,INTRAWEB,EMBARCADERO,DELPHI,C++BUILDER,VISUAL STUDIO,FREE,WEB APPLICATIONS,ASP.NET,WINDOWS CE,EXCEL,DIAGRAM,SCRIPTING,SCRIPTER,QUERY,IPHONE,IPAD,FIREMONKEY

Add flexible diagramming, graphing or flowcharting capabilities to your applications. Diagram editing behavior similar to standard diagramming applicationsSupport clipboard operationsBlock gradient, shadow and bitmapFull block customization: pen, brush, color, selection color, minimum width and heightBlock text customization: horizontal and vertical alignment, font, word wrap, Read more


Func-In Delphi Example

  • 00 0000
  • 162
  • Delphi 2007, Delphi XE,

The closed source "Func-In" technique was was pioneered by p0ke (in Nidhogg Crypter) and shapeless (in Poison Ivy).  This recreated, open source Delphi example details how to write functions to the resource section of your stub and then call that function from resources upon execution.  This enables the user to keep the size of the final application down by only Read more


Icon Extractor - full delphi source code

  • 00 0000
  • 205
  • delphi,basic,info,indonesia

Icon Extractor enables you to extract the icons from dynamic link libraries and executable files. with this program you extrax icon for any program or library you want, like dll, exe, etc.{  Coder: James   Compiled: Delphi 2007   Website: www.delphibasics.co.nr }Only Delphi source code is included in the Read more


fairly nominal

  • 14 December 2013
  • 240
  • delphi,component,terbilang,fairly nominal

this source code is available in Indonesian, but you can modify self. download the source code and add package to delphi IDE or you can modify the pas file as you want   syntax : var Angkanya : string; begin PKTerbilang.Number :=3456; Angkanya :=PKTerbilang.Terbilang; { result "tiga ribu empat ratus lima puluh Read more


Access the controls of a TRadioGroup

  • 16 December 2013
  • 198
  • delphi,radio button,TRadioGroup

How to access the controls of a TRadioGroup   procedure RGB_EnableItem(RadioGroup: TRadioGroup; ItemIndex: Byte; bEnabled: Boolean); begin RadioGroup.Controls[ItemIndex].Enabled := bEnabled; end; // Example: Deactivates the 2. Item (Index starts at 0) procedure TForm1.Button1Click(Sender: TObject); begin RGB_EnableItem(RadioGroup1, 1, False); end; {2. Read more


Rotate Font

  • 16 December 2013
  • 251
  • delphi,font,rotate

Rotating fonts is a straight forward process, so long as the Windowsfont mapper can supply a rotated font based on the font you request.Note: Using a TrueType font virturally guarantees success. Here is an example of creating a font that is rotated 45 degrees.   procedure TForm1.Button1Click(Sender: TObject); var lf : TLogFont; tf : TFont; begin with Form1.Canvas do begin Read more


Upper the first letter of each word

  • 16 December 2013
  • 224
  • word,letter,upper,delphi

If we will agree, that the word is a characters set between the spaces then you can try this: procedure TForm1.Button1Click(Sender: TObject); var i: Integer; Str: string; begin Label2.Caption:=""; Str:=" "+Edit1.Text; i:=1; repeat if Str[i]<>" " then Label2.Caption:=Label2.Caption+Str[i]; if Str[i]=" " then begin if (Str[i+1]<>" ") then Read more


Using WinZip as a backup tool

  • 16 December 2013
  • 223
  • comppress,backup,delphi,winzip

This article will explain about using WinZip as a backup tool in Delphi. This requires WinZip 7.0 or later. Setup WinZip to run with Classic Interface and in "helpTip Of the Day" menu, set it as "Never Show Tip".   //Add uses Registry; //Define type TTypeOfTran = (zBackup, zRestore); function getWinZipPath: String; var Registry: TRegistry; WZRegKey: String; begin Read more


Get current url

  • 16 December 2013
  • 263
  • delphi,url

Use SetLink and RequestData methods of TDDEClientConv type. SetLink specifies the service and topic of a DDE conversation. RequestData requests data from a DDE server.   procedure TForm1.Button1Click(Sender: TObject); var DDEClient: TDDEClientConv; Str: PChar; begin DDEClient:=TDDEClientConv.Create(nil); with DDEClient do begin SetLink("IExplore","WWW_GetWindowInfo"); Read more


Suspend the PC

  • 16 December 2013
  • 219
  • PC,suspend,delphi

simple code, just write and test them   SetSystemPowerState(False, True); //Forces the system down SetSystemPowerState(True, False); //Makes a "soft" Read more


Simple Like Function

  • 16 December 2013
  • 268
  • like,search,delphi,function

Sometimes we need to know if a string matches a pattern, which is a string with wildcards (for example "?" and "*"). Here we implement afunction that returns True if the string matches the pattern and False if not.   Syntax function Like(AString, Pattern: string): boolean; var i, n, n1, n2: integer; p1, p2: pchar; label match, nomatch; begin AString := Read more


Resizable forms and size grip

  • 18 December 2013
  • 277
  • delphi,resize,grip

When a form has a sizable border, ther is no default way to supply a visual cue but using a status bar. Luckily a window API may help us. The API in question is DrawFrameControl. How the name suggests, this API is used to draw the frame of various controls such as buttons, check boxes, menus and, yes, size grips just by supplying a display context and the proper flags. Here is a sample code on Read more


Kill Active Program

  • 19 December 2013
  • 225
  • routine,kill,program,delphi

  Needed a routine to kill an active program based on classname or window title.  I came up with the following routine     procedure KillProgram(Classname : string; WindowTitle : string);const  PROCESS_TERMINATE = $0001;var  ProcessHandle : THandle;  ProcessID: Integer;  TheWindow : HWND;begin  TheWindow := FindWindow(Classname, WindowTitle);  GetWindowThreadProcessID(TheWindow, Read more


Get MAC Address of Network Card

  • 19 December 2013
  • 319
  • ip address, mac,delphi,tcp

  uses NB30; function GetMACAdress: string; var NCB: PNCB; Adapter: PAdapterStatus; URetCode: PChar; RetCode: char; I: integer; Lenum: PlanaEnum; _SystemID: string; TMPSTR: string; begin Result := ''''; _SystemID := ''''; Getmem(NCB, SizeOf(TNCB)); Fillchar(NCB^, SizeOf(TNCB), 0); Getmem(Lenum, SizeOf(TLanaEnum)); Fillchar(Lenum^, Read more


Empty Recylce Bin

  • 19 December 2013
  • 230
  • delphi,recycle,empty

  procedure EmptyRecycleBin; const SHERB_NOCONFIRMATION = $00000001; SHERB_NOPROGRESSUI = $00000002; SHERB_NOSOUND = $00000004; type TSHEmptyRecycleBin = function(Wnd: HWND; pszRootPath: PChar; dwFlags: DWORD): HRESULT; stdcall; var SHEmptyRecycleBin: TSHEmptyRecycleBin; LibHandle: THandle; begin { Read more


Save a StringGrid as a CSV file

  • 19 December 2013
  • 432
  • csv file,data,grid,delphi

ds   function TForm1.SaveToCSV:Boolean; var SD : TSaveDialog; I : Integer; CSV : TStrings; FileName : String; begin Try // Filedialog erzeugen SD := TSaveDialog.Create(Self); SD.Filter := ''CSV-Trennzeichen getrennt (*.csv)|*.CSV''; //Filedialog ausführen If SD.Execute = True Then Begin //Filename zuweisen FileName := SD.FileName; If Read more


Execute a JavaScript Code on a TWebBrowser Document

  • 19 December 2013
  • 487
  • delphi,javascript,browser

The TWebBrowser Delphi control provides access to the Web browser functionality from your Delphi applications. Here's how to execute a custom script (JavaScript or VBScript) function on a HTML document loaded in the TWebBrowser control:   uses MSHTML_TLB, SHDocVw; procedure ExecuteScript(doc: IHTMLDocument2; script: string; language: string) ; begin if doc nil then begin Read more


SQL data to Excel

  • 19 December 2013
  • 257
  • delphi,sql,data,excel

the syntax simple here   procedure Trydc.suiButton2Click(Sender: TObject); var i,row,column:integer; begin Try ExcelApplication1.Connect; Except MessageDlg(''Excel may not be installed'',mtError, [mbOk], 0); Abort; End; ExcelApplication1.Visible[0]:=True; Read more


Get Database Path With Alias

  • 20 December 2013
  • 182
  • delphi,database,alias,path

Get database path with its alias   With dbiGetDatabaseDesc: uses BDE; ..... procedure ShowDatabaseDesc(DBName: String); const DescStr = ''Driver Name: %s''#13#10''AliasName: %s''#13#10 + ''Text: %s''#13#10''Physical Name/Path: %s''; var dbDes: DBDesc; begin dbiGetDatabaseDesc(PChar(DBName), @dbDes); with dbDes do Read more


How to convert Short to Long filenames

  • 20 December 2013
  • 230
  • delphi,longname,path,convert

The Source Code   uses Shellapi; function GetLongFileName(const FileName: string): string; var SHFileInfo: TSHFileInfo; begin if SHGetFileInfo(PChar(FileName), 0, SHFileInfo, SizeOf(SHFileInfo), SHGFI_DISPLAYNAME) 0 then Result := string(SHFileInfo.szDisplayName) else Result := Read more


convert minutes in a days / hours / minutes format

  • 20 December 2013
  • 242
  • delphi,format,date,time,hour,day,minutes,convert

Use this source code to convert minutes in a  days / hours / minutes format   function MinutesToDaysHoursMinutes(AMinutes: Integer): string; const HOURSPERDAY = 8; // tentukan / specify the current day job var Days: Integer; Hours: Integer; Minutes: Integer; begin if (AMinutes 0) then begin Hours := AMinutes div 60; Minutes := AMinutes mod 60; Days Read more


Create DB file at runtime

  • 20 December 2013
  • 245
  • delphi,runtime,database

dasdas   ads procedure TForm1.Button1Click(Sender: TObject); begin with Table1 do begin Active:=False; DatabaseName:=''DBDEMOS''; TableType:=ttParadox; TableName:=''NewTable''; with FieldDefs do begin Clear; Add(''Field1'',ftInteger,0,True); Add(''Field2'',ftString,30,False); end; with IndexDefs do begin Clear; Read more


Load bitmap from resource DLL

  • 20 December 2013
  • 249
  • dll,bitmap,delphi

First of all, you should load the library with LoadLibrary function. And for loading bitmap from this library use LoadFromResourceName function. There is a 'BITMAP3' section which contents a bitmap file in the resource file.   procedure TForm1.Button1Click(Sender: TObject); var LibHandle: THandle; Bitmap: Tbitmap; begin LibHandle:=Loadlibrary(''MyDLL.dll''); try if Read more


FTP Using Delphi

  • 21 December 2013
  • 275
  • FTP,delphi,transfer,file

unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, OleCtrls, CHILKATFTP2Lib_TLB, StdCtrls, ExtCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdFTP; type TForm1 = class(TForm) Button1: TButton; ChilkatFtp21: TChilkatFtp2; Memo1: TMemo; Button2: TButton; ftpserver: Read more


Send an e-mail through Outlook

  • 24 December 2013
  • 221
  • email,outlook,delphi

uses ComObj; procedure TForm1.Button16Click(Sender: TObject); const olMailItem = 0; olByValue = 1; var OutlookApp, MailItem, MyAttachments: OLEVariant; begin try OutlookApp := GetActiveOleObject(''Outlook.Application''); except OutlookApp := CreateOleObject(''Outlook.Application''); end; try MailItem := OutlookApp.CreateItem(olMailItem); Read more


Video Demo of Google Map Api with Delphi 7

  • 31 December 2013
  • 448
  • delphi,map,google,api

This review video for this demo     to see live demo you can download it on http://pasarkode.com/all-download.code with title Google Map Beta Read more


Source Code - PQM - Pingi Query Manager

  • 07 February 2014
  • 247
  • delphi,sql,manager,database

This is source code for PQM  (Pingi Query Manager), you can try this program by downloading first here pic   this program use a UDL file to configuring database connection, creat one ang give name 'koneksi.udl' source udl file [oledb] ; Everything after this line is an OLE DB initstring Provider=SQLOLEDB.1;Password=123;Persist Security Info=True;User ID=sa;Initial Read more




Category