HOME Delphi C# SaveToFile Print ShellExecute TJpegImage SMTP GetPort CreateFile TIdMessage SQL Send Mail in UTF-8 SmtpServer ContentType SW_HIDE TBitmap SW_SHOW CharSet Delphi Folder Navigation Dialog TidURI Resize Image Prevent Shutdown GetTempPath How to convert UTF8 string to Base64 string Java Photoshop CreateProcess Windows 7 auto logon TPrintDialog Base64Encode Code Editor Application Data Path TColor ICS v7 GetTemporaryDir GetTemporaryDrectory Argc HTML Tag HTML Tag Remove ICS AJAX imagecopyresized imagecreatefromjpeg IniFiles Invert Checkbox AnsiToUTF8 Default User Name GetSpecialFolderPath Argv ftFileCreationTime Folder Selection Folder 내 비디오 EXIF Browser Version CloudFront Private URL ColorToHtml Command Line String Convert.ToInt16 Date Time

DELPHI.ZIP

How to download/grap web pages or XML document at internet website in Delphi XE?   (created at Jul 20, 2015)   145  

If you are considering Delphi XE as cross compiler for the multiple platforms such as Android, iOS, and Windows, you need to have the standard method to get web content such as the normal text, or XML document as a result of RESTful API.Delphi provides the...

Run command with Administrator permission in Delphi on Microsoft Windows   (created at Mar 09, 2024)   135  

In Delphi, you can execute commands with administrator privileges by using the ShellExecute function with the 'runas' verb. However, if you want to execute a specific command with administrator privileges, you can use the CreateProcess function from the Wi...

How to get application version number in Delphi   (updated at Mar 09, 2024)   160  

If you need to get application version number at runtime, you can get it by calling below sample code.

Delphi Program can command level execution program with hidden mode   (updated at Jan 15, 2024)   190  

Below is the example of running command with hidden mode. Actually there lots of command type in Windows like SW_NORMAL, SW_HIDE, ...What I am going to implement is running windows command with hidden mode.Below is the example of windows command execution ...

Get the length of arrays and a string   (updated at Jan 15, 2024)   213  

The length function returns either the number of characters in Source String, or the number of elements in Source Array.Notes: Arrays start at index=0 by default, So the length of such an array is 1 more than the highest index.Following is the simple examp...

How to return exit code such as exit() function in C/C++ ?   (created at Jul 02, 2009)   91  

You can return exit code in delphi by following method: As you can see above, you can set exit code by ExitCode variable. That is global variable indicating exit code. 

How to send text/html based email in UTF-8 with TIdSMTP, TIdMessage VCL   (created at Jul 20, 2009)   65  

I had problem in encoding mail header with IdSMTP, IdMessage. I found some references in Internet, but the problem is the delivered mail subject is always filled with question marks except english letters.I found the answer to clear the problem. Here's the...

Show *any* graphics as Glyph on a SpeedButton   (created at Sep 10, 2007)   124  

TBitBtn and TSpeedButton accept only BMP pictures, if you have some other picture format, like ICO or JPG, (in an Image component) you want to show as a Glyph, you'll need to "transform" it to Bitmap, here's how:

Good Delphi components   (created at Apr 03, 2016)   87  

JVCL source code that can be obtained from http://jvcl.sourceforge.net JCL source code that can be obtained from http://jcl.sourceforge.net Virtual TreeView than can be obtained from http://www.delphi-gems.com/VirtualTreeview Delphi Chromium Embedded 3 tha...

Thread Application Implementation in TThread   (created at Apr 14, 2010)   119  

Delphi provides class for thread application as TThread.Following is the simple example for thread application.type  TForm1 = class(TForm)    Memo1: TMemo;    GroupBox1: TGroupBox;    seTimeToWork: TSpinEdit;   ...

Auto Logon Programming in Delphi   (created at Dec 31, 2010)   80  

In case that you need to develop auto logon application based on Windows operating system. You need to access windows registry. Refer below Delphi based example. (autologon.dpr) If you want to compile above sample code, just copy & paste as autologon.dpr a...

Changing the Title of a Print Dialog in Delphi   (created at Apr 20, 2011)   160  

The TPrintDialog component displays a standard Windows dialog box for sending jobs to a printer. Unfortunately, the TPrintDialog does not expose the Title property. By handing the OnShow event of a print dialog you can specify the text for the dialog’s tit...

I want to select directory(folder) not file. How can I do that ?   (created at Apr 29, 2011)   115  

Delphi provides function for directory(folder) selection as following.uses FileCtrl;var  dir : string;begin  if SelectDirectory(dir, [sdAllowCreate,  sdPerformCreate,  sdPrompt], 0) then  begin    m_directory.Text := dir;...

The Delphi function to get My Videos folder   (created at Apr 29, 2011)   169  

In order to get My Videos folder, you need to call SHGetSpecialFolderPath(). But I recommend you to use below wrapper for easy control.function GetSpecialFolderPath(Folder: Integer; CanCreate: Boolean): string;// Gets path of special system folders//// Cal...

How to resize PNG file in Delphi ?   (created at Sep 03, 2009)   77  

In case that you need to change PNG file size (width, height), you can use below function.  procedure copy_to_resized_png( tar, src:string; w, h: Integer);  var    bmp: TBitmap;    png, output: TPngImage;  begin  &nb...

Delphi API to get the current working directory   (created at Sep 03, 2009)   71  

You can get the current working directory information by GetCurrentDir function.Following is the usage example:var  m_curdir:string...m_curdir := GetCurrentDir;

Delphi API to get windows temporary directory   (created at Sep 03, 2009)   84  

When you need to access windows temp directory, you can get from environment variables.Following is the example to get temporary directory.var  m_tempdir: string...  m_tempdir := GetEnvironmentVariable('TEMP');

How to print external document ?   (created at Sep 08, 2009)   61  

Without complex programming, you can print document by ShellExecute function.use ShellAPI;...ShellExecute(Handle, 'print', PChar('c: est est.doc'), nil, nil, SW_SHOW);

How to launch application ?   (created at Sep 08, 2009)   68  

You can launch application on windows by ShellExecute function. Following is the simple example to launch application.use ShellAPI;...ShellExecute(Handle, 'open', PChar('c: estapp.exe'), nil, nil, SW_SHOW);In case of running DOS command application such as...

Is there directory selection VCL component in Delphi ?   (created at Sep 08, 2009)   106  

There are FileOpenDialog and FileSaveDialog components on Delphi VCL.Sometimes you may need directory selection dialog, but no components are found on VCL.Do you know Delphi provides the solution as SelectDirectory().Here are two examples for directory sel...

How to read/wrtie INI file in Delphi ?   (created at Aug 20, 2009)   80  

Delphi provides useful function to access INI file. With TIniFile class, you can read and write easily.Below is the simple example writing INI files.uses inifiles;...procedure Tform1.Button1Click(Sender:TObject);var  myIniFile:TIniFile;begin  myI...

Delphi Pointer Types   (created at Aug 22, 2009)   393  

Sometimes, you may confuse the name of the pointer type in delphi, because of the difference with C/C++. It's really make us confusion. Actually usage rule is also different, so I always forget how to use delphi pointer easily.Anyway below table is useful ...

Save TBitmap image to Jpeg format image in Delphi   (created at Jun 25, 2009)   85  

Delphi supports Jpeg unit as well as Bitmap unit for image processing. Following example convert and save bitmap into jpeg format. The source format must be TBitmap instance.unit jpeg;procedure BitmapToJpeg(FileName: string; Img:TGraphic);var  m_jpeg:...

How to get parameter string ?   (created at Jun 30, 2009)   40  

Just like main(argv,argc) in C, Delphi also has the similar variables to get parameter string coming from command line.Following is the simple example to display parameter list by showmessage function.procedure TMainFrm.Button3Click(Sender: TObject);var i:...

How to send email by TIdSMTP VCL ?   (created at Jul 07, 2009)   55  

TIdSMTP component is very useful VCL in Delphi 2009. Here's the simple example to send email.uses IdSMTP, IdMessage;;procedure KMAIL( sTo, title, body:string);var  IdMsg : TIdMessage;begin  IdMsg := TIdMessage.Create(nil);  try    ...

Base64 Encoding/Decoding function for Delphi   (created at Jul 16, 2009)   47  

Base64Encoding function is frequently used in MIME Type based programming. Here's the good resource for supporting base64encode and base64decode.uses IdCoder, IdCoder3to4, IdCoderMIME, jpeg;function base64Decode(const Text : ansiString): ansiString;var&nbs...

How to encode subject content when sending mail with TIdMessage ?   (created at Jul 16, 2009)   66  

Today, I tried to develop mail application with TIdMessage, but I have problem in character set encoding. And I found the answer at http://www.yac.com.pl/mt.texts.tidmessage.charset.en.htmlWith this wrapper class,   TMyMessage = class(TIdMessage) ...

When subject is crashing in TIdSMTP VCL   (created at Jul 20, 2009)   114  

In case of using Delphi 2009 with Indy 10, when I try to send an email with TIdSMTP, on the received email this text arrived as questions marks '?????'.This is caused by TIdSMTP VCL bug.You can fix it by upgrading Indy10 at ftp://indy.fulgan.com/ZIP. Pleas...

Delphi string conversion functions - AnsiToUTF-8, UTF8Encode, ...   (created at Jul 20, 2009)   51  

Delphi already provide string conversion functions variously. You just call conversion function.function UnicodeToUtf8(Dest: PChar; Source: PWideChar; MaxBytes: Integer): Integer; overload; deprecated;function Utf8ToUnicode(Dest: PWideChar; Source: PChar; ...

How to get file created time, modified time, and last accessed time ?   (created at Aug 19, 2009)   42  

In order to get the file attributes, you can get it by file search API.Here's an example of how to show the creation, last access and last modification dates and times of a file: