<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-4520949135332447736</atom:id><lastBuildDate>Tue, 01 Sep 2026 09:30:56 +0000</lastBuildDate><category>Delphi</category><category>DIY</category><category>Electronics</category><category>Delphi tutorial</category><category>PCB</category><category>Toner transfer</category><category>export data to excel</category><category>export to excel</category><category>ADC (Analog-to-Digital Converter)</category><category>Analog Input</category><category>C/C++ Programming</category><category>Embedded Systems</category><category>Export database</category><category>Export database to Excel Delphi tutorial</category><category>Microcontroller</category><category>Programming</category><category>Programming Example</category><category>Read Analog&#xa;Code</category><category>SQLite with ZEOS library</category><category>STM32 Development</category><category>STM32CubeMX</category><category>STM32G030</category><category>Sample Code</category><category>connect sqlite</category><category>convert pdf to jpg on mac</category><category>export images from pdf</category><category>export pdf to jpg</category><category>export sql to</category><category>importing ex</category><category>media player</category><category>movie player</category><category>saving a jpeg as a pdf</category><category>sql import from excel</category><category>sql query export to excel</category><category>sqlite jdbc driver</category><category>sqlite multiple connections</category><category>sqlite odbc driver</category><category>sqlite3 connection</category><category>sqliteconnection</category><category>video player</category><category>video player for windows</category><category>windows media player</category><category>windows multimediamovie player for windows 10</category><title>Delphi and other DIY</title><description>The place where the magic begins...&#xa;Learn about practical Delphi programming and some other technical stuff</description><link>https://xkobyx.blogspot.com/</link><managingEditor>noreply@blogger.com (kobyx)</managingEditor><generator>Blogger</generator><openSearch:totalResults>35</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-4053700063163210975</guid><pubDate>Mon, 05 Jun 2023 07:04:00 +0000</pubDate><atom:updated>2023-06-05T06:07:58.306-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADC (Analog-to-Digital Converter)</category><category domain="http://www.blogger.com/atom/ns#">Analog Input</category><category domain="http://www.blogger.com/atom/ns#">C/C++ Programming</category><category domain="http://www.blogger.com/atom/ns#">Embedded Systems</category><category domain="http://www.blogger.com/atom/ns#">Microcontroller</category><category domain="http://www.blogger.com/atom/ns#">Programming</category><category domain="http://www.blogger.com/atom/ns#">Programming Example</category><category domain="http://www.blogger.com/atom/ns#">Read Analog&#xa;Code</category><category domain="http://www.blogger.com/atom/ns#">Sample Code</category><category domain="http://www.blogger.com/atom/ns#">STM32 Development</category><category domain="http://www.blogger.com/atom/ns#">STM32CubeMX</category><category domain="http://www.blogger.com/atom/ns#">STM32G030</category><title>stm32g030 read analog PA0 and PA3 code with STM32CubeID</title><description>&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj7Va5K2pQY0JEaW7R2QjH_eIni7XNubzjOCyYlueyP02Beo4n3zktHOlD4Ken2qgOMnVGz83qrNq6I3fcrIt23fCPvKYkz4WzzXrgNKf1__sRnJIXq0Y6AOnn4kJ22nyJOAE36Lcq1rGLVzt-EqJ520U-kkMlhW399NEHROBFVKWqMifO4dv4uiWL6zQ&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;244&quot; data-original-width=&quot;673&quot; height=&quot;139&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj7Va5K2pQY0JEaW7R2QjH_eIni7XNubzjOCyYlueyP02Beo4n3zktHOlD4Ken2qgOMnVGz83qrNq6I3fcrIt23fCPvKYkz4WzzXrgNKf1__sRnJIXq0Y6AOnn4kJ22nyJOAE36Lcq1rGLVzt-EqJ520U-kkMlhW399NEHROBFVKWqMifO4dv4uiWL6zQ=w383-h139&quot; width=&quot;383&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To read analog values from pins PA0 and PA3 on the STM32G030 microcontroller using STM32CubeIDE, you can follow these steps:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Open STM32CubeIDE and create a new project.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Select the appropriate board or microcontroller model (STM32G030 in this case).&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Configure the necessary settings for your project, such as clock configuration and GPIO pins.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Enable the ADC peripheral:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Go to the &quot;Pinout &amp;amp; Configuration&quot; tab.&lt;/li&gt;&lt;li&gt;Select the desired ADC channel(s) for PA0 and PA3 by clicking on the respective pins.&lt;/li&gt;&lt;li&gt;Assign the pins to the ADC peripheral.&lt;/li&gt;&lt;li&gt;Click on the &quot;ADC&quot; peripheral in the &quot;Middlewares&quot; section.&lt;/li&gt;&lt;li&gt;Enable the ADC and configure its settings, such as resolution, sampling time, and conversion mode.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;In your code, include the necessary header files:&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #557799;&quot;&gt;#include &quot;stm32g0xx_hal.h&quot;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;br /&gt;

&lt;div&gt;1. Initialize the ADC and GPIO:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;ADC_HandleTypeDef hadc;
GPIO_InitTypeDef GPIO_InitStruct;

&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;SystemClock_Config&lt;/span&gt;(&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt;);
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Error_Handler&lt;/span&gt;(&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt;);

&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;MX_GPIO_Init&lt;/span&gt;(&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt;)
{
  &lt;span style=&quot;color: #888888;&quot;&gt;/* GPIO Ports Clock Enable */&lt;/span&gt;
  __HAL_RCC_GPIOA_CLK_ENABLE();

  &lt;span style=&quot;color: #888888;&quot;&gt;/*Configure GPIO pin : PA0 */&lt;/span&gt;
  GPIO_InitStruct.Pin &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; GPIO_PIN_0;
  GPIO_InitStruct.Mode &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; GPIO_MODE_ANALOG;
  GPIO_InitStruct.Pull &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; GPIO_NOPULL;
  HAL_GPIO_Init(GPIOA, &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt;GPIO_InitStruct);

  &lt;span style=&quot;color: #888888;&quot;&gt;/*Configure GPIO pin : PA3 */&lt;/span&gt;
  GPIO_InitStruct.Pin &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; GPIO_PIN_3;
  GPIO_InitStruct.Mode &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; GPIO_MODE_ANALOG;
  GPIO_InitStruct.Pull &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; GPIO_NOPULL;
  HAL_GPIO_Init(GPIOA, &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt;GPIO_InitStruct);
}

&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;MX_ADC_Init&lt;/span&gt;(&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt;)
{
  ADC_ChannelConfTypeDef sConfig;

  &lt;span style=&quot;color: #888888;&quot;&gt;/* ADC Initialization */&lt;/span&gt;
  hadc.Instance &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; ADC1;
  hadc.Init.ClockPrescaler &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; ADC_CLOCK_ASYNC_DIV1;
  hadc.Init.Resolution &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; ADC_RESOLUTION_12B;
  hadc.Init.DataAlign &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; ADC_DATAALIGN_RIGHT;
  hadc.Init.ScanConvMode &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; ADC_SCAN_DISABLE;
  hadc.Init.EOCSelection &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; ADC_EOC_SINGLE_CONV;
  hadc.Init.LowPowerAutoWait &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; DISABLE;
  hadc.Init.LowPowerAutoPowerOff &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; DISABLE;
  hadc.Init.ContinuousConvMode &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; DISABLE;
  hadc.Init.DiscontinuousConvMode &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; DISABLE;
  hadc.Init.ExternalTrigConv &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; ADC_SOFTWARE_START;
  hadc.Init.ExternalTrigConvEdge &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; ADC_EXTERNALTRIGCONVEDGE_NONE;
  hadc.Init.DMAContinuousRequests &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; DISABLE;
  hadc.Init.Overrun &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; ADC_OVR_DATA_OVERWRITTEN;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (HAL_ADC_Init(&lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt;hadc) &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; HAL_OK)
  {
    Error_Handler();
  }

  &lt;span style=&quot;color: #888888;&quot;&gt;/* Configure ADC channel */&lt;/span&gt;
  sConfig.Channel &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; ADC_CHANNEL_0; &lt;span style=&quot;color: #888888;&quot;&gt;// PA0&lt;/span&gt;
  sConfig.Rank &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;;
  sConfig.SamplingTime &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; ADC_SAMPLETIME_13CYCLES_5;
  sConfig.SingleDiff &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; ADC_SINGLE_ENDED;
  sConfig.OffsetNumber &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; ADC_OFFSET_NONE;
  sConfig.Offset &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (HAL_ADC_ConfigChannel(&lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt;hadc, &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt;sConfig) &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; HAL_OK)
  {
    Error_Handler();
  }

  sConfig.Channel &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; ADC_CHANNEL_3; &lt;span style=&quot;color: #888888;&quot;&gt;// PA3&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;pre style=&quot;line-height: 16.25px; margin-bottom: 0px; margin-top: 0px;&quot;&gt;  sConfig.Rank &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd;&quot;&gt;&lt;b&gt;2&lt;/b&gt;&lt;/span&gt;;&lt;/pre&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (HAL_ADC_ConfigChannel(&lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt;hadc, &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt;sConfig) &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; HAL_OK)
  {
    Error_Handler();
  }
}

&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;main&lt;/span&gt;(&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt;)
{
  &lt;span style=&quot;color: #888888;&quot;&gt;/* MCU Configuration */&lt;/span&gt;
  HAL_Init();
  SystemClock_Config();

  &lt;span style=&quot;color: #888888;&quot;&gt;/* Initialize GPIOs and ADC */&lt;/span&gt;
  MX_GPIO_Init();
  MX_ADC_Init();

  &lt;span style=&quot;color: #888888;&quot;&gt;/* Infinite loop */&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;while&lt;/span&gt; (&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;)
  {
    &lt;span style=&quot;color: #888888;&quot;&gt;/* Start ADC conversion */&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (HAL_ADC_Start(&lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt;hadc) &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; HAL_OK)
    {
      Error_Handler();
    }

    &lt;span style=&quot;color: #888888;&quot;&gt;/* Wait for conversion to complete */&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (HAL_ADC_PollForConversion(&lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt;hadc, HAL_MAX_DELAY) &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; HAL_OK)
    {
      Error_Handler();
    }

    &lt;span style=&quot;color: #888888;&quot;&gt;/* Read the converted value */&lt;/span&gt;
    &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;uint32_t&lt;/span&gt; adcValue &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; HAL_ADC_GetValue(&lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt;hadc);

    &lt;span style=&quot;color: #888888;&quot;&gt;/* Do something with the ADC value */&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;// ...&lt;/span&gt;

    &lt;span style=&quot;color: #888888;&quot;&gt;/* Stop ADC conversion */&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (HAL_ADC_Stop(&lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt;hadc) &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; HAL_OK)
    {
      Error_Handler();
    }
  }
}
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Make sure to handle any errors appropriately in the &lt;code&gt;Error_Handler()&lt;/code&gt; function.&lt;/p&gt;&lt;p&gt;1. Build and flash your project to the STM32G030 microcontroller.&lt;/p&gt;&lt;p&gt;This code initializes the ADC peripheral and sets up PA0 and PA3 as analog inputs. Inside the infinite loop, it starts an ADC conversion, waits for it to complete, retrieves the converted value, and then stops the ADC conversion. You can perform any necessary processing or actions with the ADC value as required.&lt;/p&gt;&lt;p&gt;Remember to refer to the STM32G0 HAL reference manual and the STM32CubeG0 firmware package documentation for more details on the ADC and GPIO APIs and configurations specific to your needs.&lt;/p&gt;

</description><link>https://xkobyx.blogspot.com/2023/06/stm32g030-read-analog-pa0-and-pa3-code.html</link><author>noreply@blogger.com (kobyx)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEj7Va5K2pQY0JEaW7R2QjH_eIni7XNubzjOCyYlueyP02Beo4n3zktHOlD4Ken2qgOMnVGz83qrNq6I3fcrIt23fCPvKYkz4WzzXrgNKf1__sRnJIXq0Y6AOnn4kJ22nyJOAE36Lcq1rGLVzt-EqJ520U-kkMlhW399NEHROBFVKWqMifO4dv4uiWL6zQ=s72-w383-h139-c" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-9087115374919096933</guid><pubDate>Tue, 10 Nov 2020 14:48:00 +0000</pubDate><atom:updated>2023-10-08T23:36:25.175-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Delphi</category><category domain="http://www.blogger.com/atom/ns#">DIY</category><category domain="http://www.blogger.com/atom/ns#">Electronics</category><category domain="http://www.blogger.com/atom/ns#">PCB</category><category domain="http://www.blogger.com/atom/ns#">Toner transfer</category><title>Amazing Home automation system with STM32F103 microcontroller Part 1</title><description>&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;i&gt;Amazing Home automation system with STM32F103 microcontroller&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;Visit my Youtube channnels&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&amp;nbsp;:&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;a href=&quot;https://youtube.com/channel/UCD-yEoFys7teYRHsWamRHYQ&quot; target=&quot;_blank&quot;&gt;Electro_Magic&lt;/a&gt;&amp;nbsp;;&amp;nbsp;&lt;a href=&quot;https://youtube.com/user/ElKobyX&quot; target=&quot;_blank&quot;&gt;Practical Tips&amp;nbsp;&lt;/a&gt;&amp;nbsp;;&amp;nbsp;&lt;a href=&quot;https://youtube.com/c/Delphipracticalschool&quot; target=&quot;_blank&quot;&gt;Delphi practical school&amp;nbsp;&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEDJFeQ3rNnY0VG8lPZf1MHOvkAQwfcF1zRqkX-_EgjAd3Brk33Jbf-3qIyjdv1naVmIQjh28gRsTA_z8cTebsZWjccBfecjLTMBIhFtmyVzKgkeQd7Bnl4nbXHkBcKkoSsOW8Ri2EwKOr/s2701/Home+automation+STM32.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Amazing Home automation&quot; border=&quot;0&quot; data-original-height=&quot;1165&quot; data-original-width=&quot;2701&quot; height=&quot;276&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEDJFeQ3rNnY0VG8lPZf1MHOvkAQwfcF1zRqkX-_EgjAd3Brk33Jbf-3qIyjdv1naVmIQjh28gRsTA_z8cTebsZWjccBfecjLTMBIhFtmyVzKgkeQd7Bnl4nbXHkBcKkoSsOW8Ri2EwKOr/w640-h276/Home+automation+STM32.jpg&quot; title=&quot;Amazing Home automation&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;This is ongoing project of building Home automation system ( smart home system ), which will for the start have measurement of temperature and humidity.&lt;/p&gt;&lt;p&gt;It will consist of number of parts ( number of blog posts ).&lt;/p&gt;&lt;p&gt;It is planed to work with micro controller STM32F103C8T6&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsowaqZiUiwURUltZpfCydYo3FxYHlTUg1fT8cP2cH_PXDzfjFScMw2ZjLRD3cH3P0jlk-qfzVJvPINypxuq0tlQoCPuM7yaiIC3CwCWs3Bo6kGsw23Q58rgz8W0Up1Qu1CCLoBpvUgclH/s2232/STM32F103.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;STM32F103C8T6 microcontroller&quot; border=&quot;0&quot; data-original-height=&quot;984&quot; data-original-width=&quot;2232&quot; height=&quot;141&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsowaqZiUiwURUltZpfCydYo3FxYHlTUg1fT8cP2cH_PXDzfjFScMw2ZjLRD3cH3P0jlk-qfzVJvPINypxuq0tlQoCPuM7yaiIC3CwCWs3Bo6kGsw23Q58rgz8W0Up1Qu1CCLoBpvUgclH/w320-h141/STM32F103.jpg&quot; title=&quot;STM32F103C8T6 microcontroller&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;and 3.5&quot; TFT LCD.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHlyuaAhuunu24-UXS7xao1RfQCu406smudfxpBfNiAbLnpnkv4WdQMR94yg_QWPvO3LR7q1MAwWqELdoVybDA68slHSsbMhq-bZlHkbv9vM9tIg-buNBc3VtY9x0IOCL4u2_s6G_reslh/s2048/TFT+LCD.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;3.5&amp;quot; TFT LCD&quot; border=&quot;0&quot; data-original-height=&quot;1226&quot; data-original-width=&quot;2048&quot; height=&quot;192&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHlyuaAhuunu24-UXS7xao1RfQCu406smudfxpBfNiAbLnpnkv4WdQMR94yg_QWPvO3LR7q1MAwWqELdoVybDA68slHSsbMhq-bZlHkbv9vM9tIg-buNBc3VtY9x0IOCL4u2_s6G_reslh/w320-h192/TFT+LCD.jpg&quot; title=&quot;3.5&amp;quot; TFT LCD&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;Next step will be to control relays for ceiling fan, etc.&lt;/p&gt;&lt;p&gt;Next will be to add ESP8266 to have connection to the internet, so the system can be controlled remotely.&lt;/p&gt;&lt;p&gt;Till now I have managed to make a printed circuit board.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilTaUZFUQ5GMPNYRSb-A7hXj5gFll5He_R_jX_0HiBm16oXqomhCCQpy0T0BUoQ1m3NsWWvjXSZbWBoocv3YBl85YKYWiKc5TG72w-UDUEspaU66dO9WSCLlo7IWxSzBWXDMsoMuTsK7Kf/s2048/Home+automation+board+2.jpg&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Home automation board&quot; border=&quot;0&quot; data-original-height=&quot;1342&quot; data-original-width=&quot;2048&quot; height=&quot;210&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilTaUZFUQ5GMPNYRSb-A7hXj5gFll5He_R_jX_0HiBm16oXqomhCCQpy0T0BUoQ1m3NsWWvjXSZbWBoocv3YBl85YKYWiKc5TG72w-UDUEspaU66dO9WSCLlo7IWxSzBWXDMsoMuTsK7Kf/w320-h210/Home+automation+board+2.jpg&quot; title=&quot;Home automation board&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Home automation board bottom&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaHIdS5elIvhuDRW6YfkOxMEr6L2iNVqn-CPNFgTbR5SGomTPKqGUCAlUp1w19bHNI04I1kBDBMksZVo9fVCMkPycj1wMU40M2BFSpXcu6ueRjdBmR4k5Te317jO_gmlRoo5u6meCdb-_H/s2048/Home+automation+board+1.jpg&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Home automation board&quot; border=&quot;0&quot; data-original-height=&quot;1315&quot; data-original-width=&quot;2048&quot; height=&quot;205&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaHIdS5elIvhuDRW6YfkOxMEr6L2iNVqn-CPNFgTbR5SGomTPKqGUCAlUp1w19bHNI04I1kBDBMksZVo9fVCMkPycj1wMU40M2BFSpXcu6ueRjdBmR4k5Te317jO_gmlRoo5u6meCdb-_H/w320-h205/Home+automation+board+1.jpg&quot; title=&quot;Home automation board&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Home automation board top&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;text-align: left;&quot;&gt;Not really nice to look at, but it is working, and working from the first attempt :-)&lt;/span&gt;&lt;/div&gt;&lt;p&gt;The PCB is designed in EasyEDA, and made with &lt;a href=&quot;https://xkobyx.blogspot.com/2020/10/diy-method-of-making-pcb-using-toner.html&quot;&gt;toner transfer method&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;346&quot; src=&quot;https://www.youtube.com/embed/p3aRRSdQjxY&quot; width=&quot;460&quot; youtube-src-id=&quot;p3aRRSdQjxY&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;text-align: left;&quot;&gt;Except headers for STM32 and TFT LCD, I have also added 3.3V and 5.0V linear regulators.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Beside this, there is also part with MC34063 as a buck converter, which is in front of small linear regulators.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;This part is made with intention to connect this device to external power source of 12V.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Of course, everything is programmed using Arduino IDE and STM32duino board.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;For measuring temperature and humidity we use DHT11 sensor, which measures temperature and also humidity and uses just three wires, plus, ground and signal.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNMwSZlz5-KB8IVaf108tISr2nmjDs9402T7VJIPIqLO_NP20LR3jfgkqoP857kQY4qPqL-qfxVDo0J0KZDPh3S2yiPj-pJbx0Hc_Im1XH6s6fivml0gv4PV6lfGJMwk4HvO7rsX7sGF7F/s1507/DHT11.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;DHT11 sensor&quot; border=&quot;0&quot; data-original-height=&quot;1507&quot; data-original-width=&quot;1120&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNMwSZlz5-KB8IVaf108tISr2nmjDs9402T7VJIPIqLO_NP20LR3jfgkqoP857kQY4qPqL-qfxVDo0J0KZDPh3S2yiPj-pJbx0Hc_Im1XH6s6fivml0gv4PV6lfGJMwk4HvO7rsX7sGF7F/w149-h200/DHT11.jpg&quot; title=&quot;DHT11 sensor&quot; width=&quot;149&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description><link>https://xkobyx.blogspot.com/2020/11/stm32f103-home-automation.html</link><author>noreply@blogger.com (kobyx)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEDJFeQ3rNnY0VG8lPZf1MHOvkAQwfcF1zRqkX-_EgjAd3Brk33Jbf-3qIyjdv1naVmIQjh28gRsTA_z8cTebsZWjccBfecjLTMBIhFtmyVzKgkeQd7Bnl4nbXHkBcKkoSsOW8Ri2EwKOr/s72-w640-h276-c/Home+automation+STM32.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-1283297161724801179</guid><pubDate>Fri, 23 Oct 2020 18:46:00 +0000</pubDate><atom:updated>2020-11-11T06:37:52.911-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">DIY</category><category domain="http://www.blogger.com/atom/ns#">Electronics</category><title>DIY method of making PCB using toner transfer method</title><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;This is a DIY method of making PCB using toner transfer method.&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;Visit my Youtube channnels&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&amp;nbsp;:&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;a href=&quot;https://youtube.com/channel/UCD-yEoFys7teYRHsWamRHYQ&quot; target=&quot;_blank&quot;&gt;Electro_Magic&lt;/a&gt;&amp;nbsp;;&amp;nbsp;&lt;a href=&quot;https://youtube.com/user/ElKobyX&quot; target=&quot;_blank&quot;&gt;Practical Tips&amp;nbsp;&lt;/a&gt;&amp;nbsp;;&amp;nbsp;&lt;a href=&quot;https://youtube.com/c/Delphipracticalschool&quot; target=&quot;_blank&quot;&gt;Delphi practical school&amp;nbsp;&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;h4&gt;&lt;br /&gt;The most important thing is to have good print , done with good quality toner.&amp;nbsp;&lt;br /&gt;Here we use some dangerous chemicals so be very careful if you going to do this at home.&lt;br /&gt;Please check following video for details, and I will show you also few steps in following points.&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/p3aRRSdQjxY&quot; width=&quot;320&quot; youtube-src-id=&quot;p3aRRSdQjxY&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;As a first step we use sandpaper to remove any oxidation from copper plate, than clean it with paper tissue.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiisrePf_dLc8t7SUYGO8ipRgdD4LbUjPenSvuh_jLMm90Vo5ymZYSFzy9wCBTJtOUJW55AYnfiaaAAwQBoshZO2hMEC0vgvBA1TJIi-BdkDuY_28KEQ8WaDGSgK8AbkdAI1QNSrzU8lyGX/s1024/001.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;PCB Board&quot; border=&quot;0&quot; data-original-height=&quot;576&quot; data-original-width=&quot;1024&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiisrePf_dLc8t7SUYGO8ipRgdD4LbUjPenSvuh_jLMm90Vo5ymZYSFzy9wCBTJtOUJW55AYnfiaaAAwQBoshZO2hMEC0vgvBA1TJIi-BdkDuY_28KEQ8WaDGSgK8AbkdAI1QNSrzU8lyGX/w320-h180/001.jpg&quot; title=&quot;PCB Board&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Than we use contact cleaner or acetone to clean any grease.&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYmzOK13f-Zz4EnKSK4o7NRytrLom638sQQCN4NJjnX1uWmR6hpkMqHq8fJPMyhtC2QHFzgYOAL5jqha49whohumsc6zl7l7Q4B931qmf6Jbj5vJ5F3OfIRRQB4ouOL8TacCfXjXD_ZIe5/s1024/002.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Contact Cleaner&quot; border=&quot;0&quot; data-original-height=&quot;576&quot; data-original-width=&quot;1024&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYmzOK13f-Zz4EnKSK4o7NRytrLom638sQQCN4NJjnX1uWmR6hpkMqHq8fJPMyhtC2QHFzgYOAL5jqha49whohumsc6zl7l7Q4B931qmf6Jbj5vJ5F3OfIRRQB4ouOL8TacCfXjXD_ZIe5/w320-h180/002.jpg&quot; title=&quot;Contact Cleaner&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Then we&amp;nbsp;secure the paper with printed circuit with adhesive tape.&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm8RQ45ipr_2uHqxlQsQg8c9oqo6MfD19Dn1RGvi8FvUYAyUWgtcojPJ0mqvKsIHu1qDT7o2P9IgPjB71RwtL6d706h9A5Tn0dE1_EarB4W03A68Dvj8ru0VenuzzuVI0_MzDcOFa5eaOP/s1024/003.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;paper with printed circuit&quot; border=&quot;0&quot; data-original-height=&quot;576&quot; data-original-width=&quot;1024&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm8RQ45ipr_2uHqxlQsQg8c9oqo6MfD19Dn1RGvi8FvUYAyUWgtcojPJ0mqvKsIHu1qDT7o2P9IgPjB71RwtL6d706h9A5Tn0dE1_EarB4W03A68Dvj8ru0VenuzzuVI0_MzDcOFa5eaOP/w320-h180/003.jpg&quot; title=&quot;paper with printed circuit&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Then&amp;nbsp; we use nail polish remover ( or acetone - nail polish remover is actually acetone ), take small amount and spread it evenly on the surface of the copper plate.&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpVrh-G3pSokGeAcJCdKB7leDkv7Hilvy_MJXpRPTWAssXTwfy_DCRFI0c9P_4Cc1aJ9SiDGptoCtik502rZGO866lJuZVRSr8-QAsMakZ39N8Q7UeGpSgRdJLGdrxdsKImOdAB10uC6jy/s1024/004.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;nail polish remover&quot; border=&quot;0&quot; data-original-height=&quot;576&quot; data-original-width=&quot;1024&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpVrh-G3pSokGeAcJCdKB7leDkv7Hilvy_MJXpRPTWAssXTwfy_DCRFI0c9P_4Cc1aJ9SiDGptoCtik502rZGO866lJuZVRSr8-QAsMakZ39N8Q7UeGpSgRdJLGdrxdsKImOdAB10uC6jy/w320-h180/004.jpg&quot; title=&quot;nail polish remover&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZf7VKeGPHs4_SZnsURxCpF6NtanVzECfsyhZFxCJ_bdhyphenhyphenypUljc69y1fcXchoqJmLnkPyE2mgmOd_Lvfg3ma0jL8Y4LgGLwBblefwSSq3am9KGzaV8G62qlUwEhsfjLHb5iikSFi-Tcca/s1024/005.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;nail polish remover&quot; border=&quot;0&quot; data-original-height=&quot;576&quot; data-original-width=&quot;1024&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZf7VKeGPHs4_SZnsURxCpF6NtanVzECfsyhZFxCJ_bdhyphenhyphenypUljc69y1fcXchoqJmLnkPyE2mgmOd_Lvfg3ma0jL8Y4LgGLwBblefwSSq3am9KGzaV8G62qlUwEhsfjLHb5iikSFi-Tcca/w320-h180/005.jpg&quot; title=&quot;nail polish remover&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ten minutes after we can start to remove paper very slowly.&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1iSeoSkTTB1FhM1eZoNXe0TupI8PkX6DDqor8R61aRPoizcRz_rus0oa3faaCvTAcgPuowvWlUIobftvhH1AKcnXLXNG2n70ayr5ReBAs1jTg8PKNK8AxQJfMCH5d1LJUKVvS4XLxXpHC/s1024/006.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;DIY PCB&quot; border=&quot;0&quot; data-original-height=&quot;576&quot; data-original-width=&quot;1024&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1iSeoSkTTB1FhM1eZoNXe0TupI8PkX6DDqor8R61aRPoizcRz_rus0oa3faaCvTAcgPuowvWlUIobftvhH1AKcnXLXNG2n70ayr5ReBAs1jTg8PKNK8AxQJfMCH5d1LJUKVvS4XLxXpHC/w320-h180/006.jpg&quot; title=&quot;DIY PCB&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;After we removed first layer of paper we put board into the water, and slowly rubbing we remove the rest of the paper.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;This rubbing should be done VERY carefully, so we do not damage toner traces.&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn2gabTRu0QZJ9_xuciaTQUpKNOwkDazx1kKgJT8V1IeZGU_RiR6Fc0CHu3A8FW1SZlJAhfilBivKeUCVF8MKxqSbiNP7tVuyr-j93an0UmG5iCpOOQDLfSOMNkDl0YlnjHoraGtJdCZVo/s1024/007.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;DIY PCB&quot; border=&quot;0&quot; data-original-height=&quot;576&quot; data-original-width=&quot;1024&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn2gabTRu0QZJ9_xuciaTQUpKNOwkDazx1kKgJT8V1IeZGU_RiR6Fc0CHu3A8FW1SZlJAhfilBivKeUCVF8MKxqSbiNP7tVuyr-j93an0UmG5iCpOOQDLfSOMNkDl0YlnjHoraGtJdCZVo/w320-h180/007.jpg&quot; title=&quot;DIY PCB&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And in the end , the result is very satisfactory.&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgijSXc802uYCo9rbxTb_yqlJYodqsQ72KbdfxDWOP9hZTgQKjNDUjkUvb0LT3bLixAkNSsupJWRPcDvpTghrezorc0KSxltCeEeQs7Sm2UEGl6av_6wfMe_6PaAacui_fnXvUcGylV4Fjv/s1024/008.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;DIY PCB&quot; border=&quot;0&quot; data-original-height=&quot;576&quot; data-original-width=&quot;1024&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgijSXc802uYCo9rbxTb_yqlJYodqsQ72KbdfxDWOP9hZTgQKjNDUjkUvb0LT3bLixAkNSsupJWRPcDvpTghrezorc0KSxltCeEeQs7Sm2UEGl6av_6wfMe_6PaAacui_fnXvUcGylV4Fjv/w320-h180/008.jpg&quot; title=&quot;DIY PCB&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Next step will be to do the etching, which could be done with &lt;a href=&quot;https://xkobyx.blogspot.com/2020/08/etching-pcb-with-hcl-and-hydrogen.html&quot;&gt;HCL and hydrogen peroxide&lt;/a&gt;.&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description><link>https://xkobyx.blogspot.com/2020/10/diy-method-of-making-pcb-using-toner.html</link><author>noreply@blogger.com (kobyx)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/p3aRRSdQjxY/default.jpg" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-647193592145457532</guid><pubDate>Thu, 20 Aug 2020 08:27:00 +0000</pubDate><atom:updated>2020-11-11T06:35:29.634-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">DIY</category><category domain="http://www.blogger.com/atom/ns#">Electronics</category><category domain="http://www.blogger.com/atom/ns#">PCB</category><category domain="http://www.blogger.com/atom/ns#">Toner transfer</category><title>Etching PCB with HCL and hydrogen peroxide</title><description>

&lt;h1 style=&quot;text-align: left;&quot;&gt;This is a DIY method of making PCB using HCL&amp;nbsp; and hydrogen peroxide .&lt;/h1&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;Visit my Youtube channnels&lt;/span&gt;&lt;/u&gt;&lt;/b&gt; :&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;a href=&quot;https://youtube.com/channel/UCD-yEoFys7teYRHsWamRHYQ&quot; target=&quot;_blank&quot;&gt;Electro_Magic&lt;/a&gt;&amp;nbsp;;&amp;nbsp;&lt;a href=&quot;https://youtube.com/user/ElKobyX&quot; target=&quot;_blank&quot;&gt;Practical Tips&amp;nbsp;&lt;/a&gt;&amp;nbsp;;&amp;nbsp;&lt;a href=&quot;https://youtube.com/c/Delphipracticalschool&quot; target=&quot;_blank&quot;&gt;Delphi practical school&amp;nbsp;&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;The most important thing is to have good print , done with good quality toner.&amp;nbsp;&lt;br /&gt;&amp;nbsp;Here we use some dangerous chemicals so be very careful if you going to do this at home.&lt;br /&gt;
Please check following video for details, and I will show you also few steps in following points.&lt;/h4&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/UWulEt1P29g&quot; width=&quot;320&quot; youtube-src-id=&quot;UWulEt1P29g&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;First you must have good print, done with good quality toner.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2LC4sa8Mv0a1qaN_19AzDwwTG1-jWELHV_dJpyNLKF3tQv-epdJYkXg5RUZIMNBJYPYtrrYpVkDQ87NtsYf4SVpDuPOrgIhgZAXGuLXIpUGUuPxhEN5ZxTAFfAwJTcQ8-NEkGB7XMvMD3/s1920/001.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Printed circuit board&quot; border=&quot;0&quot; data-original-height=&quot;1080&quot; data-original-width=&quot;1920&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2LC4sa8Mv0a1qaN_19AzDwwTG1-jWELHV_dJpyNLKF3tQv-epdJYkXg5RUZIMNBJYPYtrrYpVkDQ87NtsYf4SVpDuPOrgIhgZAXGuLXIpUGUuPxhEN5ZxTAFfAwJTcQ8-NEkGB7XMvMD3/w320-h180/001.jpg&quot; title=&quot;Printed circuit board&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1298149506906421&quot; data-ad-slot=&quot;5928500521&quot; style=&quot;display: inline-block; height: 60px; text-align: left; width: 568px;&quot;&gt;&lt;/ins&gt;&lt;span style=&quot;text-align: left;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1298149506906421&quot; data-ad-slot=&quot;5928500521&quot; style=&quot;display: inline-block; height: 60px; width: 568px;&quot;&gt;&lt;/ins&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Then we put prepared PCB in plastic box.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY-2OPhT9f51hzgEHDl_PKqJZqyYahFC_cmdpMGz3OncCc-io2uut9rp_Pr2b6QVMmcCEFfn7ErpVUBSzbdoigA18TwxvV4JVSdhs9aNc4DhrVaJ4ztc_MY2Ftt2ZBceDKQJc1RWFfMEzv/s1920/002.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Chemicals&quot; border=&quot;0&quot; data-original-height=&quot;1080&quot; data-original-width=&quot;1920&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY-2OPhT9f51hzgEHDl_PKqJZqyYahFC_cmdpMGz3OncCc-io2uut9rp_Pr2b6QVMmcCEFfn7ErpVUBSzbdoigA18TwxvV4JVSdhs9aNc4DhrVaJ4ztc_MY2Ftt2ZBceDKQJc1RWFfMEzv/w320-h180/002.jpg&quot; title=&quot;Chemicals&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;For etching we use HCL and Hydrogen peroxide.We pour in HCL just enough to cover PCB, then we add a little of peroxide.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9s9PUQAFBR8U15RAv4LpZeGPQz-juIHVQ5mudn7cgv0BIpINKgLkRL3R4H3g9knu-U_baD4VWGDe_XPuA6UmKYOwYKBghQA2CuKMeC06yPXaw7zjnXWDu8nPLYa4OmCOwbNhWZ7kJw37a/s1920/003.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;HCL&quot; border=&quot;0&quot; data-original-height=&quot;1080&quot; data-original-width=&quot;1920&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9s9PUQAFBR8U15RAv4LpZeGPQz-juIHVQ5mudn7cgv0BIpINKgLkRL3R4H3g9knu-U_baD4VWGDe_XPuA6UmKYOwYKBghQA2CuKMeC06yPXaw7zjnXWDu8nPLYa4OmCOwbNhWZ7kJw37a/w320-h180/003.jpg&quot; title=&quot;HCL&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikyf4U0UXa6axCn_31jaau0YAPrq_q1je-2g583YIwSG2dmr2_gRFU8-woOaqdCrG2VVNTf5kuP9_7AdwuKmcpB9WJVlfrGBOFiVH5qU16aKqThJoaxLECBto3_2eiqVcV2h629FDA-ZHT/s1920/004.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Hydrogen peroxide&quot; border=&quot;0&quot; data-original-height=&quot;1080&quot; data-original-width=&quot;1920&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikyf4U0UXa6axCn_31jaau0YAPrq_q1je-2g583YIwSG2dmr2_gRFU8-woOaqdCrG2VVNTf5kuP9_7AdwuKmcpB9WJVlfrGBOFiVH5qU16aKqThJoaxLECBto3_2eiqVcV2h629FDA-ZHT/w320-h180/004.jpg&quot; title=&quot;Hydrogen peroxide&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsJN01heGF7BFOkUj7hRcEJcnlYSUtqy-jJ-l43UlAb1tkqcWju_PhLnO4h6utA5KqdUXgznsqHu-tNebUcMHoigI8iw84aEiVV03fuuvgpS5W6-P4Nzc9Bl5kjdXHE-ebjXnpZQpEEy2t/s1920/005.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1080&quot; data-original-width=&quot;1920&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsJN01heGF7BFOkUj7hRcEJcnlYSUtqy-jJ-l43UlAb1tkqcWju_PhLnO4h6utA5KqdUXgznsqHu-tNebUcMHoigI8iw84aEiVV03fuuvgpS5W6-P4Nzc9Bl5kjdXHE-ebjXnpZQpEEy2t/w320-h180/005.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;tlid-translation translation&quot; lang=&quot;en&quot;&gt;&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1298149506906421&quot; data-ad-slot=&quot;5928500521&quot; style=&quot;display: inline-block; height: 60px; width: 568px;&quot;&gt;&lt;/ins&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;tlid-translation translation&quot; lang=&quot;en&quot;&gt;We immediately see how reactions with copper occur.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivb_tQJ7RKQO4fiQ1xF1JXrYIQfACFI3j34aobWHunp9x9Pjas6_K5yrGEfnh1Hl2TOMxD6j7yU77ikKbX2vifPRdWfE_5_I_fsz5fzr503ZpFzXnCEcEgoIhHhyphenhyphenudo4ZkesMVDreIqTLM/s1920/006.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1080&quot; data-original-width=&quot;1920&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivb_tQJ7RKQO4fiQ1xF1JXrYIQfACFI3j34aobWHunp9x9Pjas6_K5yrGEfnh1Hl2TOMxD6j7yU77ikKbX2vifPRdWfE_5_I_fsz5fzr503ZpFzXnCEcEgoIhHhyphenhyphenudo4ZkesMVDreIqTLM/w320-h180/006.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;tlid-translation translation&quot; lang=&quot;en&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;tlid-translation translation&quot; lang=&quot;en&quot;&gt;Here we see bubbles in the reaction of acid with copper.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXZlEUsYI80YyBTp6oI_Auvtfw8zDviR11tpNCAr2YeGVpbx7INeJYXk548CYBQx7I2OdHLYJxF2Nm9eQz703BUOKKCDUsvM3n9VqGkinyAKumNslfl0cFKKdkCzz1BMBZiUcIeKgBazhk/s1920/007.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1080&quot; data-original-width=&quot;1920&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXZlEUsYI80YyBTp6oI_Auvtfw8zDviR11tpNCAr2YeGVpbx7INeJYXk548CYBQx7I2OdHLYJxF2Nm9eQz703BUOKKCDUsvM3n9VqGkinyAKumNslfl0cFKKdkCzz1BMBZiUcIeKgBazhk/w320-h180/007.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1298149506906421&quot; data-ad-slot=&quot;5928500521&quot; style=&quot;display: inline-block; height: 60px; width: 568px;&quot;&gt;&lt;/ins&gt;&lt;br /&gt;
&lt;br /&gt;

After few minutes we can see full reaction .&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2R22FCbaqjGPWdnfw3HZ68VWUiDjSauLCYnRrQ0RgwMFaIz939__LkP8VYcTUPY-KTb1_5Q-FLvwk6DykKyxTl3nHAIqJUcR3wSF8yLf9v1g0MONr79YSYIF_bi_lkYMQ5Ya8UHgC0jby/s1920/008.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1080&quot; data-original-width=&quot;1920&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2R22FCbaqjGPWdnfw3HZ68VWUiDjSauLCYnRrQ0RgwMFaIz939__LkP8VYcTUPY-KTb1_5Q-FLvwk6DykKyxTl3nHAIqJUcR3wSF8yLf9v1g0MONr79YSYIF_bi_lkYMQ5Ya8UHgC0jby/w320-h180/008.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;After etching is done, we rinse pcb with water.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj1Iw5lk0edZZNfOPr9eAbVE-rLPTG5Z9bwm3EISflV0DRfOoqGp6P8qSoSuIFQZW_sRkplDWKLy8dKEjSyKHdMnlILz1yuys00GsoJGaZik17p7JTsfRCydD7wqMtb31pkKXHX06BlYrs/s1920/009.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1080&quot; data-original-width=&quot;1920&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj1Iw5lk0edZZNfOPr9eAbVE-rLPTG5Z9bwm3EISflV0DRfOoqGp6P8qSoSuIFQZW_sRkplDWKLy8dKEjSyKHdMnlILz1yuys00GsoJGaZik17p7JTsfRCydD7wqMtb31pkKXHX06BlYrs/w320-h180/009.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;tlid-translation translation&quot; lang=&quot;en&quot;&gt;
  
  
  &lt;br /&gt;
&lt;script async=&quot;&quot; src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1298149506906421&quot; data-ad-slot=&quot;5928500521&quot; style=&quot;display: inline-block; height: 60px; width: 568px;&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;  
  
  Use a steel sponge to remove any toner residue.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;tlid-translation translation&quot; lang=&quot;en&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT67x3u384Py502g-vzFlFJDZspBTz2vcW_g9sLN9hsICV80kKWDLpl1pN09icsXh9RU9ejKAqcjzzXLkm8ss-1boKwbwu8osQwu0rzbJnPlgffGREP2ydJZpWqN4SiRCJxR_53ZkFlRjD/s1920/011.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1080&quot; data-original-width=&quot;1920&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT67x3u384Py502g-vzFlFJDZspBTz2vcW_g9sLN9hsICV80kKWDLpl1pN09icsXh9RU9ejKAqcjzzXLkm8ss-1boKwbwu8osQwu0rzbJnPlgffGREP2ydJZpWqN4SiRCJxR_53ZkFlRjD/w320-h180/011.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;tlid-translation translation&quot; lang=&quot;en&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;tlid-translation translation&quot; lang=&quot;en&quot;&gt;The PCB looks almost perfect.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitgCq0kxt1tKhS2xQy6xRunMKEA22xWrzrF3Ri5bv4q-x1s9dBSuoeZ6gyU7HtB1Uc1iC0K3OX3apX9gPrFzBRf1mmKC1WgLFO17NnjR3kLknOxhm9rzPAr83WfBrS3TU-i2nRmUPSA853/s1920/012.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1080&quot; data-original-width=&quot;1920&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitgCq0kxt1tKhS2xQy6xRunMKEA22xWrzrF3Ri5bv4q-x1s9dBSuoeZ6gyU7HtB1Uc1iC0K3OX3apX9gPrFzBRf1mmKC1WgLFO17NnjR3kLknOxhm9rzPAr83WfBrS3TU-i2nRmUPSA853/w400-h225/012.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;tlid-translation translation&quot; lang=&quot;en&quot;&gt;It is very important to have a well-done print at the very beginning, with quality toner.
    
    &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;

     &lt;br /&gt;
&lt;script async=&quot;&quot; src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1298149506906421&quot; data-ad-slot=&quot;5928500521&quot; style=&quot;display: inline-block; height: 60px; width: 568px;&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt; 
</description><link>https://xkobyx.blogspot.com/2020/08/etching-pcb-with-hcl-and-hydrogen.html</link><author>noreply@blogger.com (kobyx)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/UWulEt1P29g/default.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-4638344814091359817</guid><pubDate>Mon, 09 Apr 2018 16:29:00 +0000</pubDate><atom:updated>2020-11-11T06:39:22.651-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Delphi</category><title>Compress files and folders to zip file with Delphi (Tip for 10 )</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjLQBNwyX-iyy5DMz64pEGQKgNVb6LjqUO-4HXMBXweVUcURqenQNb2Uyxv_gvKsxnP2BhSWzAg625ga_Xwzzl6vXx0H9cf82sePqCFZfeXtPxhQZulwkaaETVXenZbrMAje3zILfuCEhu/s1600/FrontImage.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;426&quot; data-original-width=&quot;850&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjLQBNwyX-iyy5DMz64pEGQKgNVb6LjqUO-4HXMBXweVUcURqenQNb2Uyxv_gvKsxnP2BhSWzAg625ga_Xwzzl6vXx0H9cf82sePqCFZfeXtPxhQZulwkaaETVXenZbrMAje3zILfuCEhu/s400/FrontImage.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;Visit my Youtube channnels&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&amp;nbsp;:&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;a href=&quot;https://youtube.com/channel/UCD-yEoFys7teYRHsWamRHYQ&quot; target=&quot;_blank&quot;&gt;Electro_Magic&lt;/a&gt;&amp;nbsp;;&amp;nbsp;&lt;a href=&quot;https://youtube.com/user/ElKobyX&quot; target=&quot;_blank&quot;&gt;Practical Tips&amp;nbsp;&lt;/a&gt;&amp;nbsp;;&amp;nbsp;&lt;a href=&quot;https://youtube.com/c/Delphipracticalschool&quot; target=&quot;_blank&quot;&gt;Delphi practical school&amp;nbsp;&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;
This is an example of zipping ( compressing ) files and folders with Delphi using &quot;FWZip&quot; component which can be downloaded from following link :&lt;/h2&gt;
&lt;br /&gt;
https://github.com/AlexanderBagel/FWZip&lt;br /&gt;
&lt;br /&gt;
In this video you can see full procedure of this example :&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allow=&quot;autoplay; encrypted-media&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/4kgFPSX9E7c&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
And following is full source of this example :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;(code style formatted by&amp;nbsp;http://hilite.me/ )&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;

&lt;!--HTML generated using hilite.me--&gt;&lt;br /&gt;
&lt;div style=&quot;background: rgb(255, 255, 255); border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;unit&lt;/span&gt; MainForm&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;interface&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
  Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Messages&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Variants&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Graphics&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Dialogs&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; StdCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; FWZipWriter&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ExtCtrls&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
  TForm1 &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt;(TForm)
    ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TListBox&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    cmdOpenFoF&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    cmdClearList&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    GroupBox1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TGroupBox&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    GroupBox2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TGroupBox&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    rbFiles&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TRadioButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    rbFolders&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TRadioButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    rbSeparate&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TRadioButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    rboneFile&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TRadioButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Edit1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    cmdZip&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    FileOpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TFileOpenDialog&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Splitter1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TSplitter&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdClearListClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdOpenFoFClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;rbSeparateClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;rboneFileClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdZipClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormClose&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; Action&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TCloseAction)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;private&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Private declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;public&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Public declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  Form1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TForm1&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   LoadedFiles&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TStringList&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;implementation&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.dfm}&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdClearListClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
LoadedFiles&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdOpenFoFClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
i&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; rbFiles&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Checked&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;true&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
FileOpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Options&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;FileOpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Options&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;[fdoPickFolders]&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; rbFiles&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Checked&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;false&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
FileOpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Options&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;FileOpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Options&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;[fdoPickFolders]&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; FileOpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Execute &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; I &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;to&lt;/span&gt; FileOpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Files&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Count &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;color: #007020;&quot;&gt;ExtractFileName&lt;/span&gt;(FileOpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Files[i]))&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
LoadedFiles&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(FileOpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Files[i])&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 Edit1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;ExtractFileName&lt;/span&gt;(FileOpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FileName)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;//now I have to create stringlist to handle full file names&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;//now looks good, let&#39;s test&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdZipClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
FName&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;FNameOfSel&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;ZippedRoot&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;WideString&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
i&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
S&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TStringStream&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
PresentFiles&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TStringList&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
SR&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TSearchRec&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Zip&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TFWZipWriter&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
BuildZipResult&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TBuildZipResult&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Screen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Cursor&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;crHourGlass&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZippedRoot&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;ExpandFileName&lt;/span&gt;(&lt;span style=&quot;color: #007020;&quot;&gt;ExtractFileDir&lt;/span&gt;(FileOpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FileName))&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; rbSeparate&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Checked&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;true&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; I &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;to&lt;/span&gt; LoadedFiles&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Count &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Zip&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;TFWZipWriter&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Create&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Zip&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;UseUTF8String&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
FName&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;LoadedFiles[i]&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
FNameOfSel&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;ExtractFileName&lt;/span&gt;(FName)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;DirectoryExists&lt;/span&gt;(FName)&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;false&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #007020;&quot;&gt;SetCurrentDir&lt;/span&gt;(ZippedRoot&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;\&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
S&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;TStringStream&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Create(FName)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
S&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Position&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Zip&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AddStream(FNameOfSel&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;S)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
S&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Free&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
BuildZipResult&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Zip&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;BuildZip(ZippedRoot&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;\&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;FNameOfSel&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;.zip&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #007020;&quot;&gt;ForceDirectories&lt;/span&gt;(ZippedRoot&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;\&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Zip&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Free&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;DirectoryExists&lt;/span&gt;(FName)&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;true&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #007020;&quot;&gt;SetCurrentDir&lt;/span&gt;(FName)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
PresentFiles&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;TStringList&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Create&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; Zip&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AddFolder(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;..\&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;FNameOfSel&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;\&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;raise&lt;/span&gt; Exception&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Create(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Error adding data&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;FindFirst&lt;/span&gt;(FName&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;*.*&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;faAnyFile&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;SR)&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;repeat&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (SR&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Name&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;.&#39;&lt;/span&gt;) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;or&lt;/span&gt; (SR&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Name&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;..&#39;&lt;/span&gt;) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Continue&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 PresentFiles&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;AddFilesAndFolders\&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;SR&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Name&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;=..\..\&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;SR&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Name)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;until&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;FindNext&lt;/span&gt;(SR)&lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #007020;&quot;&gt;FindClose&lt;/span&gt;(SR)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Zip&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AddFilesAndFolders(PresentFiles&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
PresentFiles&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Free&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
BuildZipResult&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Zip&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;BuildZip(ZippedRoot&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;\&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;FNameOfSel&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;.zip&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #007020;&quot;&gt;ForceDirectories&lt;/span&gt;(ZippedRoot&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;\&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Zip&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Free&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; rbSeparate&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Checked&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;false&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #888888;&quot;&gt;//ups&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Zip&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;TFWZipWriter&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Create&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Zip&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;UseUTF8String&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; I &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;to&lt;/span&gt; LoadedFiles&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Count &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
FName&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;LoadedFiles[i]&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
FNameOfSel&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;ExtractFileName&lt;/span&gt;(FName)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;DirectoryExists&lt;/span&gt;(FName)&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;false&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #007020;&quot;&gt;SetCurrentDir&lt;/span&gt;(ZippedRoot&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;\&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
S&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;TStringStream&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Create(FName)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
S&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Position&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Zip&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AddStream(FNameOfSel&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;S)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
S&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Free&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #007020;&quot;&gt;ForceDirectories&lt;/span&gt;(ZippedRoot&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;\&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;DirectoryExists&lt;/span&gt;(FName)&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;true&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #007020;&quot;&gt;SetCurrentDir&lt;/span&gt;(FName)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
PresentFiles&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;TStringList&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Create&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; Zip&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AddFolder(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;..\&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;FNameOfSel&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;\&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;raise&lt;/span&gt; Exception&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Create(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Error adding data&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;FindFirst&lt;/span&gt;(FName&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;*.*&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;faAnyFile&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;SR)&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;repeat&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (SR&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Name&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;.&#39;&lt;/span&gt;) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;or&lt;/span&gt; (SR&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Name&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;..&#39;&lt;/span&gt;) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Continue&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 PresentFiles&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;AddFilesAndFolders\&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;SR&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Name&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;=..\..\&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;SR&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Name)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;until&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;FindNext&lt;/span&gt;(SR)&lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #007020;&quot;&gt;FindClose&lt;/span&gt;(SR)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Zip&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AddFilesAndFolders(PresentFiles&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
PresentFiles&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Free&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #007020;&quot;&gt;ForceDirectories&lt;/span&gt;(ZippedRoot&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;\&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
BuildZipResult&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Zip&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;BuildZip(ZippedRoot&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;\&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;Edit1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;.zip&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #007020;&quot;&gt;ForceDirectories&lt;/span&gt;(ZippedRoot&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;\&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Zip&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Free&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

Screen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Cursor&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;crDefault&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormClose&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; Action&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TCloseAction)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
LoadedFiles&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Free&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
LoadedFiles&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;TStringList&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Create&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;  &lt;span style=&quot;color: #888888;&quot;&gt;//No No No !!!!&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;rboneFileClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Edit1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Enabled&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Enabled&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;rbSeparateClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Edit1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Enabled&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Enabled&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;

&lt;script async=&quot;&quot; src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1298149506906421&quot; data-ad-slot=&quot;5928500521&quot; style=&quot;display: inline-block; height: 60px; width: 568px;&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;

&lt;br /&gt;
And Form file :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;!--HTML generated using hilite.me--&gt;&lt;br /&gt;
&lt;div style=&quot;background: rgb(255, 255, 255); border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; Form1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TForm1
  Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;299&lt;/span&gt;
  Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;148&lt;/span&gt;
  Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Compress files and folders&#39;&lt;/span&gt;
  ClientHeight &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;385&lt;/span&gt;
  ClientWidth &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;634&lt;/span&gt;
  Color &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; clBtnFace
  Font&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Charset &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; DEFAULT_CHARSET
  Font&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; clWindowText
  Font&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;11&lt;/span&gt;
  Font&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Name &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Tahoma&#39;&lt;/span&gt;
  Font&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Style &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; []
  OldCreateOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;
  Position &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; poDesigned
  OnClose &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; FormClose
  OnCreate &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; FormCreate
  PixelsPerInch &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;96&lt;/span&gt;
  TextHeight &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;13&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; Splitter1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TSplitter
    Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;303&lt;/span&gt;
    Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;
    Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;385&lt;/span&gt;
    Align &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; alRight
    ExplicitLeft &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;321&lt;/span&gt;
    ExplicitTop &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;156&lt;/span&gt;
    ExplicitHeight &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;100&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TListBox
    Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;306&lt;/span&gt;
    Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;
    Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;328&lt;/span&gt;
    Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;385&lt;/span&gt;
    Align &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; alRight
    ItemHeight &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;13&lt;/span&gt;
    TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; cmdOpenFoF&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton
    Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;8&lt;/span&gt;
    Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;12&lt;/span&gt;
    Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;173&lt;/span&gt;
    Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;25&lt;/span&gt;
    Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Open file or folder&#39;&lt;/span&gt;
    TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;
    OnClick &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; cmdOpenFoFClick
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; cmdClearList&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton
    Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;213&lt;/span&gt;
    Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;12&lt;/span&gt;
    Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;75&lt;/span&gt;
    Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;25&lt;/span&gt;
    Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Clear list&#39;&lt;/span&gt;
    TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;
    OnClick &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; cmdClearListClick
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; GroupBox1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TGroupBox
    Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;8&lt;/span&gt;
    Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;51&lt;/span&gt;
    Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;280&lt;/span&gt;
    Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;115&lt;/span&gt;
    Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Open files or folders&#39;&lt;/span&gt;
    TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; rbFiles&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TRadioButton
      Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;12&lt;/span&gt;
      Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;24&lt;/span&gt;
      Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;113&lt;/span&gt;
      Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;17&lt;/span&gt;
      Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Files&#39;&lt;/span&gt;
      Checked &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;
      TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;
      TabStop &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; rbFolders&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TRadioButton
      Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;12&lt;/span&gt;
      Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;60&lt;/span&gt;
      Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;113&lt;/span&gt;
      Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;17&lt;/span&gt;
      Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Folders&#39;&lt;/span&gt;
      TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; GroupBox2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TGroupBox
    Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;8&lt;/span&gt;
    Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;177&lt;/span&gt;
    Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;280&lt;/span&gt;
    Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;145&lt;/span&gt;
    Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Zip type selector&#39;&lt;/span&gt;
    TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; Label1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel
      Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;12&lt;/span&gt;
      Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;87&lt;/span&gt;
      Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;43&lt;/span&gt;
      Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;13&lt;/span&gt;
      Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Zip name&#39;&lt;/span&gt;
      Enabled &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; rbSeparate&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TRadioButton
      Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;12&lt;/span&gt;
      Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;24&lt;/span&gt;
      Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;113&lt;/span&gt;
      Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;17&lt;/span&gt;
      Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Separate separate&#39;&lt;/span&gt;
      Checked &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;
      TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;
      TabStop &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;
      OnClick &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; rbSeparateClick
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; rboneFile&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TRadioButton
      Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;12&lt;/span&gt;
      Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;54&lt;/span&gt;
      Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;113&lt;/span&gt;
      Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;17&lt;/span&gt;
      Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Zip in one file&#39;&lt;/span&gt;
      TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;
      OnClick &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; rbOneFileClick
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; Edit1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit
      Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;12&lt;/span&gt;
      Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;103&lt;/span&gt;
      Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;121&lt;/span&gt;
      Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;21&lt;/span&gt;
      Enabled &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;
      TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; cmdZip&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton
    Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;8&lt;/span&gt;
    Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;342&lt;/span&gt;
    Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;280&lt;/span&gt;
    Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;25&lt;/span&gt;
    Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Zip&#39;&lt;/span&gt;
    TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;
    OnClick &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; cmdZipClick
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; FileOpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TFileOpenDialog
    DefaultFolder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;.\&#39;&lt;/span&gt;
    FavoriteLinks &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;
    FileTypes &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;
    Options &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; [fdoAllowMultiSelect]
    Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;207&lt;/span&gt;
    Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;243&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
</description><link>https://xkobyx.blogspot.com/2018/04/compress-files-and-folders-to-zip-file.html</link><author>noreply@blogger.com (kobyx)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjLQBNwyX-iyy5DMz64pEGQKgNVb6LjqUO-4HXMBXweVUcURqenQNb2Uyxv_gvKsxnP2BhSWzAg625ga_Xwzzl6vXx0H9cf82sePqCFZfeXtPxhQZulwkaaETVXenZbrMAje3zILfuCEhu/s72-c/FrontImage.png" height="72" width="72"/><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-722594377354596028</guid><pubDate>Wed, 03 Jan 2018 19:41:00 +0000</pubDate><atom:updated>2022-07-15T00:53:40.274-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">convert pdf to jpg on mac</category><category domain="http://www.blogger.com/atom/ns#">Delphi</category><category domain="http://www.blogger.com/atom/ns#">export data to excel</category><category domain="http://www.blogger.com/atom/ns#">export images from pdf</category><category domain="http://www.blogger.com/atom/ns#">export pdf to jpg</category><category domain="http://www.blogger.com/atom/ns#">export to excel</category><category domain="http://www.blogger.com/atom/ns#">saving a jpeg as a pdf</category><title>Export Image To PDF with Delphi (Tip for 10 )</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmeX21R5HnD_YLkfPEzKnOHzW7sGjk5HHWlL5QDKSqp1QALpfxz26RGi_Iy1c6_Llx9tTovcRqzjgDih6UHEvMAGyk95y7Tg-vtiK24Ag5gHxKLEq49VChD_Vx0dlgzxIUj9vPN_38BHj5/s1600/MainImage.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;462&quot; data-original-width=&quot;903&quot; height=&quot;203&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmeX21R5HnD_YLkfPEzKnOHzW7sGjk5HHWlL5QDKSqp1QALpfxz26RGi_Iy1c6_Llx9tTovcRqzjgDih6UHEvMAGyk95y7Tg-vtiK24Ag5gHxKLEq49VChD_Vx0dlgzxIUj9vPN_38BHj5/s400/MainImage.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;script async=&quot;&quot; src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1298149506906421&quot; data-ad-slot=&quot;5928500521&quot; style=&quot;display: inline-block; height: 60px; width: 568px;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;Visit my Youtube channnels&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&amp;nbsp;:&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;a href=&quot;https://youtube.com/channel/UCD-yEoFys7teYRHsWamRHYQ&quot; target=&quot;_blank&quot;&gt;Electro_Magic&lt;/a&gt;&amp;nbsp;;&amp;nbsp;&lt;a href=&quot;https://youtube.com/user/ElKobyX&quot; target=&quot;_blank&quot;&gt;Practical Tips&amp;nbsp;&lt;/a&gt;&amp;nbsp;;&amp;nbsp;&lt;a href=&quot;https://youtube.com/c/Delphipracticalschool&quot; target=&quot;_blank&quot;&gt;Delphi practical school&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;

This is example how one can export image from Delphi application to PDF file, using open source library SynPDF.&lt;/h2&gt;
&lt;br /&gt;
In the following video full procedure is described&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allow=&quot;encrypted-media&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; gesture=&quot;media&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/4s2YDcRPP78&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Library can be downloaded from :&lt;br /&gt;
https://github.com/synopse/SynPDF&lt;br /&gt;
&lt;br /&gt;
Following is full source code :&lt;br /&gt;
Edited 10.01.2018 : added code for the Form after main code.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;(code style formatted by&amp;nbsp;http://hilite.me/ )&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;script async=&quot;&quot; src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1298149506906421&quot; data-ad-slot=&quot;5928500521&quot; style=&quot;display: inline-block; height: 60px; width: 568px;&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;

&lt;!--HTML generated using hilite.me--&gt;&lt;br /&gt;
&lt;div style=&quot;background: rgb(255, 255, 255); border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;unit&lt;/span&gt; MainForm&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;interface&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
  Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Messages&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Variants&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Graphics&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Dialogs&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; StdCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ExtCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; jpeg&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;SynPdf&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ShellAPI&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
  TfrmMain &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt;(TForm)
    Panel1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Image1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TImage&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button4&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Edit1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Panel2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    ColorDialog1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TColorDialog&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Panel3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button5&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button6&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TOpenDialog&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

    Panel4&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button7&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    CheckBox1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TCheckBox&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    SaveDialog1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TSaveDialog&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button5Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Panel2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Edit1Change&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button3Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button4Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormResize&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Image1MouseDown&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Button&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TMouseButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      Shift&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TShiftState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Image1MouseMove&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Shift&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TShiftState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
      Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Image1MouseUp&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Button&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TMouseButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      Shift&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TShiftState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button6Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button7Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;private&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Private declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;public&lt;/span&gt;
   State&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   DrawColor&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TColor&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   PenW&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  frmMain&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TfrmMain&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Drawing&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Boolean&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;implementation&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.dfm}&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
State&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
State&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button3Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
State&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button4Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
State&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button5Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Execute() &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Picture&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;LoadFromFile(OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FileName)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ClientWidth&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ClientHeight&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;60&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Picture&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Bitmap&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Picture&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Bitmap&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button6Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;clWhite&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Brush&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;clWhite&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Rectangle(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button7Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
lPDF&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TPdfDocument&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
lPage&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TPdfPage&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Jpegimage&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TJPEGImage&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
pdfimage&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TPdfImage&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; SaveDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Execute() &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
lPDF&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;TPdfDocument&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Create&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;try&lt;/span&gt;
  lPDF&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;DefaultPaperSize&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;psA4&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  lPDF&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;DefaultPageLandscape&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;CheckBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Checked&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  lPage&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;lPDF&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AddPage&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   Jpegimage&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;TJPEGImage&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Create&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   Jpegimage&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Assign(Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Picture&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Graphic)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   pdfimage&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;TPdfImage&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Create(lPDF&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Jpegimage&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;true&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   lPDF&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AddXObject(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Image1&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;pdfimage)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   lPDF&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;DrawXObject(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;lPage&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;PageHeight&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;Jpegimage&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Jpegimage&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Jpegimage&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Image1&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   lPDF&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SaveToFile(SaveDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FileName&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;.pdf&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   ShellExecute(Handle&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;open&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;PChar&lt;/span&gt;(SaveDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FileName&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;.pdf&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;nil&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
   &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;nil&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;SW_SHOWNORMAL)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;finally&lt;/span&gt;
lPDF&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Free&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Edit1Change&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
PenW&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;StrToInt&lt;/span&gt;(Edit1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;with&lt;/span&gt; Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;clWhite&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Brush&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;clWhite&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #007020;&quot;&gt;Rect&lt;/span&gt;(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  State&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  DrawColor&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;clBlack&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  PenW&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormResize&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ClientWidth&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ClientHeight&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;60&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Picture&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Bitmap&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Picture&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Bitmap&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Image1MouseDown&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Button&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TMouseButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Shift&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TShiftState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Drawing&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
StartX&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;X&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; StartY&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Y&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
EndX&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;X&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; EndY&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Y&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (State&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;or&lt;/span&gt; (State&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;clWhite&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;PenW&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; State&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;DrawColor&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;PenW&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;PenPos&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Point(X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Y)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Image1MouseMove&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Shift&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TShiftState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  PenColor&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TColor&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; Drawing&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;true&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; State&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;      &lt;span style=&quot;color: #888888;&quot;&gt;//start drawing line&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;with&lt;/span&gt; Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
   Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Mode&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;pmXor&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   MoveTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   LineTo(EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Mode&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;pmXor&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   MoveTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   LineTo(x&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;y)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 EndX&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;X&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; EndY&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Y&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; State&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;    &lt;span style=&quot;color: #888888;&quot;&gt;// start drawing rectangular&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;with&lt;/span&gt; Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Mode&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;pmXOR&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  MoveTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  LineTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  LineTo(EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  LineTo(EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  LineTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Mode&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;pmXOR&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  MoveTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  LineTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;y)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  LineTo(x&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;y)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  LineTo(x&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  LineTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
EndX&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;X&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; EndY&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Y&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; State&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;    &lt;span style=&quot;color: #888888;&quot;&gt;// start drawing ellipse&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;with&lt;/span&gt; Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
PenColor&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Brush&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Ellipse(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;PenColor&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Ellipse(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Y)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
EndX&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;X&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; EndY&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Y&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; State&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;    &lt;span style=&quot;color: #888888;&quot;&gt;// start drawing freehand&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;with&lt;/span&gt; Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
LineTo(X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Y)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Image1MouseUp&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Button&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TMouseButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Shift&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TShiftState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; State&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;      &lt;span style=&quot;color: #888888;&quot;&gt;//end drawing line&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;with&lt;/span&gt; Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
   Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Mode&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;pmXOR&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   MoveTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   LineTo(EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;DrawColor&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Mode&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;pmCopy&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   MoveTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   LineTo(EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; State&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;    &lt;span style=&quot;color: #888888;&quot;&gt;// end drawing rectangular&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;with&lt;/span&gt; Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
      Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Mode&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;pmXOR&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      MoveTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      LineTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      LineTo(EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      LineTo(EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      LineTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;DrawColor&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      Brush&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;clWhite&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Mode&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;pmCopy&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      MoveTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      LineTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      LineTo(EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      LineTo(EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      LineTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

Drawing&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Panel2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; ColorDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Execute() &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Panel2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ColorDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
DrawColor&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ColorDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Panel2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Repaint&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;

&lt;script async=&quot;&quot; src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1298149506906421&quot; data-ad-slot=&quot;5928500521&quot; style=&quot;display: inline-block; height: 60px; width: 568px;&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;

Form code (copy to text editor and save as .DFM file ) :&lt;!--HTML generated using hilite.me--&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: rgb(255, 255, 255); border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; frmMain&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TfrmMain
  Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;256&lt;/span&gt;
  Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;162&lt;/span&gt;
  Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Paint&#39;&lt;/span&gt;
  ClientHeight &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;451&lt;/span&gt;
  ClientWidth &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;784&lt;/span&gt;
  Color &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; clBtnFace
  DoubleBuffered &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;
  Font&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Charset &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; DEFAULT_CHARSET
  Font&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; clWindowText
  Font&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;11&lt;/span&gt;
  Font&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Name &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Tahoma&#39;&lt;/span&gt;
  Font&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Style &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; []
  OldCreateOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;
  Position &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; poDesigned
  OnCreate &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; FormCreate
  OnResize &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; FormResize
  PixelsPerInch &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;96&lt;/span&gt;
  TextHeight &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;13&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; Image1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TImage
    Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;185&lt;/span&gt;
    Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;
    Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;599&lt;/span&gt;
    Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;451&lt;/span&gt;
    Align &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; alClient
    Stretch &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;
    OnMouseDown &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Image1MouseDown
    OnMouseMove &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Image1MouseMove
    OnMouseUp &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Image1MouseUp
    ExplicitLeft &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;291&lt;/span&gt;
    ExplicitTop &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;114&lt;/span&gt;
    ExplicitWidth &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;105&lt;/span&gt;
    ExplicitHeight &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;105&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; Panel1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel
    Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;
    Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;
    Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;185&lt;/span&gt;
    Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;451&lt;/span&gt;
    Align &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; alLeft
    TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; Label1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel
      AlignWithMargins &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;
      Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;
      Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;128&lt;/span&gt;
      Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;177&lt;/span&gt;
      Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;13&lt;/span&gt;
      Align &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; alTop
      Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39; Line width&#39;&lt;/span&gt;
      ExplicitWidth &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;51&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; Button1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton
      AlignWithMargins &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;
      Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;
      Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;
      Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;177&lt;/span&gt;
      Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;25&lt;/span&gt;
      Align &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; alTop
      Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Line&#39;&lt;/span&gt;
      TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;
      OnClick &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Button1Click
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; Button2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton
      AlignWithMargins &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;
      Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;
      Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;35&lt;/span&gt;
      Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;177&lt;/span&gt;
      Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;25&lt;/span&gt;
      Align &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; alTop
      Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Rect&#39;&lt;/span&gt;
      TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;
      OnClick &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Button2Click
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; Button3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton
      AlignWithMargins &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;
      Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;
      Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;66&lt;/span&gt;
      Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;177&lt;/span&gt;
      Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;25&lt;/span&gt;
      Align &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; alTop
      Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Ellipse&#39;&lt;/span&gt;
      TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;
      OnClick &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Button3Click
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; Button4&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton
      AlignWithMargins &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;
      Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;
      Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;97&lt;/span&gt;
      Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;177&lt;/span&gt;
      Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;25&lt;/span&gt;
      Align &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; alTop
      Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Freehand&#39;&lt;/span&gt;
      TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;
      OnClick &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Button4Click
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; Edit1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit
      Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;
      Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;141&lt;/span&gt;
      Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;183&lt;/span&gt;
      Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;21&lt;/span&gt;
      Align &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; alTop
      NumbersOnly &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;
      TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;
      Text &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;2&#39;&lt;/span&gt;
      OnChange &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Edit1Change
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; Panel2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel
      Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;
      Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;162&lt;/span&gt;
      Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;183&lt;/span&gt;
      Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;41&lt;/span&gt;
      Align &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; alTop
      Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Color&#39;&lt;/span&gt;
      ParentBackground &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;
      TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;
      OnClick &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Panel2Click
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; Panel3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel
      Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;
      Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;258&lt;/span&gt;
      Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;183&lt;/span&gt;
      Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;192&lt;/span&gt;
      Align &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; alBottom
      TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;6&lt;/span&gt;
      &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; Button5&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton
        AlignWithMargins &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;
        Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;
        Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;
        Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;175&lt;/span&gt;
        Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;25&lt;/span&gt;
        Align &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; alTop
        Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Open bitmap&#39;&lt;/span&gt;
        TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;
        OnClick &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Button5Click
      &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
      &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; Button6&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton
        Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;
        Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;166&lt;/span&gt;
        Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;181&lt;/span&gt;
        Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;25&lt;/span&gt;
        Align &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; alBottom
        Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Clear all&#39;&lt;/span&gt;
        TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;
        OnClick &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Button6Click
      &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
      &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; Panel4&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel
        Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;
        Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;111&lt;/span&gt;
        Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;181&lt;/span&gt;
        Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;55&lt;/span&gt;
        Align &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; alBottom
        TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;
        &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; Button7&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton
          Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;
          Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;
          Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;179&lt;/span&gt;
          Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;25&lt;/span&gt;
          Align &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; alTop
          Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Export to PDF&#39;&lt;/span&gt;
          TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;
          OnClick &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Button7Click
          ExplicitLeft &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;60&lt;/span&gt;
          ExplicitTop &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;27&lt;/span&gt;
          ExplicitWidth &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;75&lt;/span&gt;
        &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
        &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; CheckBox1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TCheckBox
          AlignWithMargins &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;
          Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;
          Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;34&lt;/span&gt;
          Width &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;173&lt;/span&gt;
          Height &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;17&lt;/span&gt;
          Align &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; alBottom
          Caption &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Landscape&#39;&lt;/span&gt;
          TabOrder &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;
          ExplicitLeft &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;63&lt;/span&gt;
          ExplicitTop &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;42&lt;/span&gt;
          ExplicitWidth &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;97&lt;/span&gt;
        &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
      &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; ColorDialog1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TColorDialog
    Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;39&lt;/span&gt;
    Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;213&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TOpenDialog
    Filter &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Bitmap|*.bmp&#39;&lt;/span&gt;
    Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;108&lt;/span&gt;
    Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;213&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;object&lt;/span&gt; SaveDialog1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TSaveDialog
    FileName &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;test&#39;&lt;/span&gt;
    Filter &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;PDF File|*.pdf&#39;&lt;/span&gt;
    InitialDir &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;...&#39;&lt;/span&gt;
    Left &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;75&lt;/span&gt;
    Top &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;315&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
</description><link>https://xkobyx.blogspot.com/2018/01/export-image-to-pdf-with-delphi.html</link><author>noreply@blogger.com (kobyx)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmeX21R5HnD_YLkfPEzKnOHzW7sGjk5HHWlL5QDKSqp1QALpfxz26RGi_Iy1c6_Llx9tTovcRqzjgDih6UHEvMAGyk95y7Tg-vtiK24Ag5gHxKLEq49VChD_Vx0dlgzxIUj9vPN_38BHj5/s72-c/MainImage.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>New York, NY, USA</georss:featurename><georss:point>40.7127753 -74.0059728</georss:point><georss:box>12.402541463821152 -109.1622228 69.023009136178842 -38.849722799999995</georss:box></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-106222178487279705</guid><pubDate>Wed, 13 Dec 2017 13:42:00 +0000</pubDate><atom:updated>2020-10-23T11:48:17.202-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Delphi</category><title>Draw shapes with Delphi (Tip for 10 )</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6GWBi2tZt441xuE092L6dgH4RmH4eelsB_d1KRMicoNsFJ4pWTBoAgsyoHrV4XAQ5i4xZeA3oECthKju5Vf88eP8qqrOlXZXXZea37u6BV020AFsmmzZjf5sgxV5rH8ZziXnDXRhYqY87/s1600/MainImage.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;442&quot; data-original-width=&quot;858&quot; height=&quot;205&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6GWBi2tZt441xuE092L6dgH4RmH4eelsB_d1KRMicoNsFJ4pWTBoAgsyoHrV4XAQ5i4xZeA3oECthKju5Vf88eP8qqrOlXZXXZea37u6BV020AFsmmzZjf5sgxV5rH8ZziXnDXRhYqY87/s400/MainImage.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
In this tutorial you can learn how to draw shapes with Delphi.&lt;br /&gt;
&lt;br /&gt;
This is actually example of how you can create your own Paint application.&lt;br /&gt;
&lt;br /&gt;
In the video below you can see complete procedure of this tutorial.&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allow=&quot;encrypted-media&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; gesture=&quot;media&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/j0rjHDDu0nA&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Also, following is full source code :&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;(code style formatted by&amp;nbsp;http://hilite.me/ )&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;unit&lt;/span&gt; MainForm&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;interface&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
  Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Messages&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Variants&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Graphics&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Dialogs&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; StdCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ExtCtrls&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
  TfrmMain &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt;(TForm)
    Panel1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Image1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TImage&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button4&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Edit1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Panel2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    ColorDialog1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TColorDialog&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Panel3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button5&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button6&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TOpenDialog&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button5Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Panel2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Edit1Change&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button3Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button4Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormResize&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Image1MouseDown&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Button&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TMouseButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      Shift&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TShiftState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Image1MouseMove&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Shift&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TShiftState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
      Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Image1MouseUp&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Button&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TMouseButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      Shift&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TShiftState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button6Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;private&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Private declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;public&lt;/span&gt;
   State&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   DrawColor&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TColor&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   PenW&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  frmMain&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TfrmMain&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Drawing&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Boolean&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;implementation&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.dfm}&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
State&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
State&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button3Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
State&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button4Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
State&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button5Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Execute() &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Picture&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;LoadFromFile(OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FileName)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button6Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;clWhite&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Brush&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;clWhite&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Rectangle(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Edit1Change&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
PenW&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;StrToInt&lt;/span&gt;(Edit1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;with&lt;/span&gt; Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;clWhite&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Brush&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;clWhite&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #007020;&quot;&gt;Rect&lt;/span&gt;(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  State&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  DrawColor&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;clBlack&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  PenW&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormResize&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ClientWidth&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ClientHeight&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;60&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Picture&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Bitmap&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Picture&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Bitmap&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Image1MouseDown&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Button&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TMouseButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Shift&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TShiftState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Drawing&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
StartX&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;X&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; StartY&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Y&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
EndX&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;X&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; EndY&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Y&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (State&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;or&lt;/span&gt; (State&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;clWhite&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;PenW&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; State&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;DrawColor&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;PenW&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;PenPos&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Point(X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Y)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Image1MouseMove&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Shift&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TShiftState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  PenColor&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TColor&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; Drawing&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;true&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; State&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;      &lt;span style=&quot;color: #888888;&quot;&gt;//start drawing line&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;with&lt;/span&gt; Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
   Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Mode&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;pmXor&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   MoveTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   LineTo(EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Mode&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;pmXor&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   MoveTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   LineTo(x&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;y)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 EndX&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;X&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; EndY&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Y&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; State&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;    &lt;span style=&quot;color: #888888;&quot;&gt;// start drawing rectangular&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;with&lt;/span&gt; Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Mode&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;pmXOR&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  MoveTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  LineTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  LineTo(EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  LineTo(EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  LineTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Mode&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;pmXOR&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  MoveTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  LineTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;y)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  LineTo(x&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;y)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  LineTo(x&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  LineTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
EndX&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;X&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; EndY&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Y&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; State&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;    &lt;span style=&quot;color: #888888;&quot;&gt;// start drawing ellipse&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;with&lt;/span&gt; Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
PenColor&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Brush&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Ellipse(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;PenColor&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Ellipse(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Y)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
EndX&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;X&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; EndY&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Y&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; State&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;    &lt;span style=&quot;color: #888888;&quot;&gt;// start drawing freehand&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;with&lt;/span&gt; Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
LineTo(X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Y)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Image1MouseUp&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Button&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TMouseButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Shift&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TShiftState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; State&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;      &lt;span style=&quot;color: #888888;&quot;&gt;//end drawing line&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;with&lt;/span&gt; Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
   Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Mode&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;pmXOR&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   MoveTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   LineTo(EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;DrawColor&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Mode&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;pmCopy&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   MoveTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   LineTo(EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; State&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;    &lt;span style=&quot;color: #888888;&quot;&gt;// end drawing rectangular&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;with&lt;/span&gt; Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Canvas &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
      Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Mode&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;pmXOR&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      MoveTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      LineTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      LineTo(EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      LineTo(EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      LineTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;DrawColor&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      Brush&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;clWhite&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      Pen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Mode&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;pmCopy&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      MoveTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      LineTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      LineTo(EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;EndY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      LineTo(EndX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      LineTo(StartX&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;StartY)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

Drawing&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Panel2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; ColorDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Execute() &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Panel2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ColorDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
DrawColor&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ColorDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Panel2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Repaint&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
</description><link>https://xkobyx.blogspot.com/2017/12/draw-shapes-with-delphi.html</link><author>noreply@blogger.com (kobyx)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6GWBi2tZt441xuE092L6dgH4RmH4eelsB_d1KRMicoNsFJ4pWTBoAgsyoHrV4XAQ5i4xZeA3oECthKju5Vf88eP8qqrOlXZXXZea37u6BV020AFsmmzZjf5sgxV5rH8ZziXnDXRhYqY87/s72-c/MainImage.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-2198241834456733079</guid><pubDate>Thu, 30 Nov 2017 14:21:00 +0000</pubDate><atom:updated>2020-10-23T11:48:17.215-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Electronics</category><title>LAB power supply with current control (Tip for 10 )</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
LAB power supply with current control from 0 to 1.5 Ampere (Tip for 10 )&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS_PnDEd2k7HeeJVbAs4j9XrNYYS4_xD1SYkrWWMVo74fScD8v2pHFbw56TAsB2KKTgPY4K-Lr-R07ypqKihlDGEl_0IHYto2tqf8Cf5o5nwCz5rbCnEaexxlbdKe1q7gpq_mIBei4owou/s1600/PowerSupplyLM317.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;456&quot; data-original-width=&quot;1038&quot; height=&quot;175&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS_PnDEd2k7HeeJVbAs4j9XrNYYS4_xD1SYkrWWMVo74fScD8v2pHFbw56TAsB2KKTgPY4K-Lr-R07ypqKihlDGEl_0IHYto2tqf8Cf5o5nwCz5rbCnEaexxlbdKe1q7gpq_mIBei4owou/s400/PowerSupplyLM317.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
This is simpler version of variable power supply shown in &lt;a href=&quot;http://xkobyx.blogspot.com/2017/11/lm317-variable-power-supply-with.html&quot; target=&quot;_blank&quot;&gt;this post.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Voltage is variable from 0 to 30 Volts and current from 0 to 1.5 Ampere.&lt;br /&gt;
&lt;br /&gt;
LM317T is mostly in standard setup.&lt;br /&gt;
&lt;br /&gt;
Potentiometer for voltage control is connected to ADJ pin of LM317T and negative voltage via trim pot, with which you can adjust minimum voltage.&lt;br /&gt;
&lt;br /&gt;
Current control is done using&amp;nbsp;&lt;span style=&quot;background-color: white; color: #545454; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;LM393 comparator and shunt resistror.&lt;br /&gt;
&lt;br /&gt;
Output of LM393 is connected to ADJ pin of LM317T and regulates amperage, sensed over shunt resistor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><link>https://xkobyx.blogspot.com/2017/11/lab-power-supply-with-current-control.html</link><author>noreply@blogger.com (kobyx)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS_PnDEd2k7HeeJVbAs4j9XrNYYS4_xD1SYkrWWMVo74fScD8v2pHFbw56TAsB2KKTgPY4K-Lr-R07ypqKihlDGEl_0IHYto2tqf8Cf5o5nwCz5rbCnEaexxlbdKe1q7gpq_mIBei4owou/s72-c/PowerSupplyLM317.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-8381596627649183358</guid><pubDate>Wed, 29 Nov 2017 19:52:00 +0000</pubDate><atom:updated>2020-10-23T11:48:17.224-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Delphi</category><title>Get Base File Info (Tip for 10 )</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSwCDfjJpAaQmM8yFhW1DaesDisVaGyPxNJ4LLbGZVBNxLbUTyem59XEki_Mz-Aul_Wa9SF0wzYPUp3yQvWd9CZZ8wCWWRw5oqlUDKrbZueO8RAUJEfl1ZEZrltESy01bFPw-DEUXht3r8/s1600/MainImage.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;459&quot; data-original-width=&quot;877&quot; height=&quot;207&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSwCDfjJpAaQmM8yFhW1DaesDisVaGyPxNJ4LLbGZVBNxLbUTyem59XEki_Mz-Aul_Wa9SF0wzYPUp3yQvWd9CZZ8wCWWRw5oqlUDKrbZueO8RAUJEfl1ZEZrltESy01bFPw-DEUXht3r8/s400/MainImage.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Here you can see example of getting basic file information.&lt;br /&gt;
&lt;br /&gt;
Complete procedure of making this example program can be seen in the following video.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allow=&quot;encrypted-media&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; gesture=&quot;media&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/rgsyb6bFkss&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:568px;height:60px&quot;
     data-ad-client=&quot;ca-pub-1298149506906421&quot;
     data-ad-slot=&quot;5928500521&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;

And following is full source code that you can use to test this example by yourself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;(code style formatted by&amp;nbsp;http://hilite.me/ )&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;unit&lt;/span&gt; MainForm&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;interface&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
  Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Messages&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Variants&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Graphics&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Dialogs&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ComCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ExtCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; StdCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ShellAPI&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
  TfrmMain &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt;(TForm)
    Panel1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Image1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TImage&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TOpenDialog&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    ListView1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TListView&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;private&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Private declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;public&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Public declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  frmMain&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TfrmMain&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;implementation&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;function&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;GetFileSizeAsString&lt;/span&gt;(&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;const&lt;/span&gt; FSize &lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Int64&lt;/span&gt;) &lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #888888;&quot;&gt;// Function to get size in bytes , KB,MB or GB&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; FSize&lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1024&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;Result&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;IntToStr&lt;/span&gt;(FSize)&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39; bytes&#39;&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; FSize&lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt;(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1024&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1024&lt;/span&gt;) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
    &lt;span style=&quot;color: #007020;&quot;&gt;Result&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;FormatFloat&lt;/span&gt;(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;####0.##&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;FSize&lt;span style=&quot;color: #333333;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1024&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39; KB&#39;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; FSize&lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt;(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1024&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1024&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1024&lt;/span&gt;) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
    &lt;span style=&quot;color: #007020;&quot;&gt;Result&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;FormatFloat&lt;/span&gt;(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;####0.##&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;FSize&lt;span style=&quot;color: #333333;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1024&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1024&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39; MB&#39;&lt;/span&gt;
        &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt;
    &lt;span style=&quot;color: #007020;&quot;&gt;Result&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;FormatFloat&lt;/span&gt;(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;####0.##&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;FSize&lt;span style=&quot;color: #333333;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1024&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1024&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1024&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39; GB&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.dfm}&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
itm&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TListItem&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
icn&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;HICON&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
SHFileInfo&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TSHFileInfo&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
SearchRecord&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TSearchRec&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Size&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Execute() &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ListView1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
SHGetFileInfo(&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;PChar&lt;/span&gt;(OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FileName)&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;SHFileInfo&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;SizeOf&lt;/span&gt;(TSHFileInfo)&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;SHGFI_TYPENAME &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;or&lt;/span&gt;
SHGFI_DISPLAYNAME &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;or&lt;/span&gt; SHGFI_SYSICONINDEX &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;or&lt;/span&gt; SHGFI_ICON)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #007020;&quot;&gt;FindFirst&lt;/span&gt;(OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FileName&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;SearchRecord)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Size&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;SearchRecord&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Size&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

itm&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ListView1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
itm&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Display Name&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
itm&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SubItems&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(SHFileInfo&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;szDisplayName)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

itm&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ListView1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
itm&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Type Name&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
itm&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SubItems&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(SHFileInfo&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;szTypeName)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

itm&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ListView1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
itm&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Size&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
itm&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SubItems&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(GetFileSizeAsString(Size))&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

itm&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ListView1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
itm&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Last Access Date Time&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
itm&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SubItems&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;color: #007020;&quot;&gt;DateTimeToStr&lt;/span&gt;(&lt;span style=&quot;color: #007020;&quot;&gt;FileDateToDateTime&lt;/span&gt;(SearchRecord&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Time)))&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

itm&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ListView1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
itm&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Path&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
itm&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SubItems&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;color: #007020;&quot;&gt;ExtractFilePath&lt;/span&gt;(OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FileName))&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

icn&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;SHFileInfo&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;hIcon&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Picture&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Icon&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Handle&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;icn&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
</description><link>https://xkobyx.blogspot.com/2017/11/get-base-file-info.html</link><author>noreply@blogger.com (kobyx)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSwCDfjJpAaQmM8yFhW1DaesDisVaGyPxNJ4LLbGZVBNxLbUTyem59XEki_Mz-Aul_Wa9SF0wzYPUp3yQvWd9CZZ8wCWWRw5oqlUDKrbZueO8RAUJEfl1ZEZrltESy01bFPw-DEUXht3r8/s72-c/MainImage.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-3519787959132575051</guid><pubDate>Wed, 29 Nov 2017 15:15:00 +0000</pubDate><atom:updated>2020-10-23T11:48:17.234-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Electronics</category><title>LM317 Variable power supply with current control (Tip for 10 )</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjknZbGBCUDOBOXzZ6HIf6-XQZ3Eh0CDY8jlKMYOEE8TV5t1Gj3fuLnXSt7yiV1r7Qx1dSaYkpor2qDd6tG40MD1F4ylQyeSy-qAbNpzJ9Q1edjUxbskUrWkIRZ6ac5_SbAtKq6IkhWZ8tq/s1600/PowerSupplyWCC.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;465&quot; data-original-width=&quot;1110&quot; height=&quot;167&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjknZbGBCUDOBOXzZ6HIf6-XQZ3Eh0CDY8jlKMYOEE8TV5t1Gj3fuLnXSt7yiV1r7Qx1dSaYkpor2qDd6tG40MD1F4ylQyeSy-qAbNpzJ9Q1edjUxbskUrWkIRZ6ac5_SbAtKq6IkhWZ8tq/s400/PowerSupplyWCC.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
In this post I will show you easy to construct variable power supply using LM317 with some other components.&lt;br /&gt;
&lt;br /&gt;
Final result is usable variable lab power supply with current control.&lt;br /&gt;
&lt;br /&gt;
Current control is done using &lt;span style=&quot;background-color: white; color: #545454; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;LM393 comparator and shunt resistror.&lt;br /&gt;
&lt;br /&gt;
Since I used one panel meter for voltage and current reading , I added LM358 OP amp to read current used by attached loads.&lt;br /&gt;
&lt;br /&gt;
LM358 amplifies voltage detected on shunt resistor and amplify it to appropriate value which is set by variable trim pot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><link>https://xkobyx.blogspot.com/2017/11/lm317-variable-power-supply-with.html</link><author>noreply@blogger.com (kobyx)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjknZbGBCUDOBOXzZ6HIf6-XQZ3Eh0CDY8jlKMYOEE8TV5t1Gj3fuLnXSt7yiV1r7Qx1dSaYkpor2qDd6tG40MD1F4ylQyeSy-qAbNpzJ9Q1edjUxbskUrWkIRZ6ac5_SbAtKq6IkhWZ8tq/s72-c/PowerSupplyWCC.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-557854075496975397</guid><pubDate>Mon, 30 Oct 2017 18:56:00 +0000</pubDate><atom:updated>2020-10-23T11:48:17.244-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Delphi</category><title>Get Computer Drives - Delphi Tutorial (Tip for 10 )</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRfGqPve3c-Bs36-CLaj2pEoSo3oss9QN1rLuHtUJUrWZFV6a2ImN5SNJdcVy9LfuSqdQ08o0ZoYienn1rA1fzjb9cDWOo5_qG5c0MZo9VSwUM_RbMI5EbKk7mIex26xrul4gwJ4AoA_qt/s1600/MainImage.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;400&quot; data-original-width=&quot;849&quot; height=&quot;186&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRfGqPve3c-Bs36-CLaj2pEoSo3oss9QN1rLuHtUJUrWZFV6a2ImN5SNJdcVy9LfuSqdQ08o0ZoYienn1rA1fzjb9cDWOo5_qG5c0MZo9VSwUM_RbMI5EbKk7mIex26xrul4gwJ4AoA_qt/s400/MainImage.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
In this example you can see how we can get list of Computer Drives with icons and labels.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;First, check this video with details for this example .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; gesture=&quot;media&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/vOvmraVZKfI&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;br /&gt;

&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:568px;height:60px&quot;
     data-ad-client=&quot;ca-pub-1298149506906421&quot;
     data-ad-slot=&quot;5928500521&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;

&amp;nbsp;And of course following is the source code of this example :&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;(code style formatted by&amp;nbsp;http://hilite.me/ )&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;unit&lt;/span&gt; MainForm&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;interface&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
  Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Messages&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Variants&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Graphics&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Dialogs&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ShellAPI&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Buttons&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ExtCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; StdCtrls&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
  TfrmMain &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt;(TForm)
    Panel1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;private&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Private declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;public&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Public declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  frmMain&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TfrmMain&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;implementation&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.dfm}&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
fDriveSize&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Cardinal&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
fDrives&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;array&lt;/span&gt;[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;..&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;128&lt;/span&gt;] &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;of&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Char&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
fDrive &lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;PChar&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
flag&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Cardinal&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
infoFile&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;SHFILEINFO&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
S&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
btn&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TSpeedButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
iconx&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TIcon&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;

 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;try&lt;/span&gt;
 fDriveSize&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;GetLogicalDriveStrings(&lt;span style=&quot;color: #007020;&quot;&gt;SizeOf&lt;/span&gt;(fDrives)&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;fDrives)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; fDriveSize&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Exit&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 fDrive&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;fDrives&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;while&lt;/span&gt; fDrive&lt;span style=&quot;color: #333333;&quot;&gt;^&amp;lt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0044dd;&quot;&gt;#0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
   btn&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;TSpeedButton&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Create(Panel1)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   btn&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Parent&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Panel1&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   btn&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Align&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;alLeft&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

   flag&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;SHGFI_ICON&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   flag&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;flag &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;or&lt;/span&gt; SHGFI_SMALLICON &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;or&lt;/span&gt; SHGFI_DISPLAYNAME&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   ZeroMemory(&lt;span style=&quot;color: #007020;&quot;&gt;Addr&lt;/span&gt;(infoFile)&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;SizeOf&lt;/span&gt;(infoFile))&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   SHGetFileInfo(&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;PChar&lt;/span&gt;(fDrive)&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;infoFile&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;SizeOf&lt;/span&gt;(infoFile)&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;flag)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   S&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;infoFile&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;szDisplayName&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

   iconx&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Ticon&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Create&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   iconx&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Handle&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;infoFile&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;hIcon&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

   btn&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Glyph&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Assign(iconx)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   btn&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;S&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   btn&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;120&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   &lt;span style=&quot;color: #007020;&quot;&gt;Inc&lt;/span&gt;(fDrive&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;Sizeof&lt;/span&gt;(fDrive))&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   DestroyIcon(infoFile&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;hIcon)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   iconx&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Free&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;finally&lt;/span&gt;

 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
</description><link>https://xkobyx.blogspot.com/2017/10/get-computer-drives-delphi-tutorial.html</link><author>noreply@blogger.com (kobyx)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRfGqPve3c-Bs36-CLaj2pEoSo3oss9QN1rLuHtUJUrWZFV6a2ImN5SNJdcVy9LfuSqdQ08o0ZoYienn1rA1fzjb9cDWOo5_qG5c0MZo9VSwUM_RbMI5EbKk7mIex26xrul4gwJ4AoA_qt/s72-c/MainImage.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-6136211717611642647</guid><pubDate>Fri, 13 Oct 2017 18:28:00 +0000</pubDate><atom:updated>2020-10-23T11:48:17.255-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Delphi</category><title>Web browser Delphi Example (Tip for 10 )</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCIMAeolbv-bTKnbs7VCb4sQO3YqNtArsm5arIBAuFBTGE0d6ych5oZ0bv7zHkVa17D9wvhNlinSbT-90LekBnQNSJB6TqlCKs1mesLufIWoRi8bRdhTM6mPtdzBNBoFxLCwGJ8mczCGXh/s1600/MainImage.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;404&quot; data-original-width=&quot;860&quot; height=&quot;187&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCIMAeolbv-bTKnbs7VCb4sQO3YqNtArsm5arIBAuFBTGE0d6ych5oZ0bv7zHkVa17D9wvhNlinSbT-90LekBnQNSJB6TqlCKs1mesLufIWoRi8bRdhTM6mPtdzBNBoFxLCwGJ8mczCGXh/s400/MainImage.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
As you will see, it is possible to create simple Web browser very quickly using Delphi and component TWebBrowser , which encapsulates Internet Explorer ActiveX component.&lt;br /&gt;
&lt;br /&gt;
In this video you can see all the details of creating such web browser :&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/lchvNEv6L0g&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
And of course following is the source code for this example :&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;(code style formatted by&amp;nbsp;http://hilite.me/ )&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;unit&lt;/span&gt; MainForm&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;interface&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
  Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Messages&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Variants&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Graphics&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Dialogs&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; OleCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SHDocVw&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; StdCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ExtCtrls&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
  TfrmMain &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt;(TForm)
    txtAddress&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    cmdLoad&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    WebBrowser1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TWebBrowser&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Panel1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    cmdBack&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdLoadClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdBackClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;private&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Private declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;public&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Public declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 &lt;span style=&quot;color: #888888;&quot;&gt;// Simple example which can be built to be a real web browser.&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  frmMain&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TfrmMain&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;implementation&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.dfm}&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdBackClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
WebBrowser1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;GoBack&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;   &lt;span style=&quot;color: #888888;&quot;&gt;//it seams that something is not working :-)&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;//a lot of options available to expand app&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdLoadClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
WebBrowser1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Navigate(txtAddress&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
WebBrowser1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Silent&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #888888;&quot;&gt;//disable java script errors/windows...&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
</description><link>https://xkobyx.blogspot.com/2017/10/web-browser-delphi-example.html</link><author>noreply@blogger.com (kobyx)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCIMAeolbv-bTKnbs7VCb4sQO3YqNtArsm5arIBAuFBTGE0d6ych5oZ0bv7zHkVa17D9wvhNlinSbT-90LekBnQNSJB6TqlCKs1mesLufIWoRi8bRdhTM6mPtdzBNBoFxLCwGJ8mczCGXh/s72-c/MainImage.png" height="72" width="72"/><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-322402104168232109</guid><pubDate>Tue, 03 Oct 2017 20:15:00 +0000</pubDate><atom:updated>2022-07-15T01:02:09.724-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">media player</category><category domain="http://www.blogger.com/atom/ns#">movie player</category><category domain="http://www.blogger.com/atom/ns#">video player</category><category domain="http://www.blogger.com/atom/ns#">video player for windows</category><category domain="http://www.blogger.com/atom/ns#">windows media player</category><category domain="http://www.blogger.com/atom/ns#">windows multimediamovie player for windows 10</category><title>Media Player with VLC ActiveX Type library Delphi tutorial (Tip for 10 )</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivTx_2sOnf0Gf-xT-gjS71fXX8MFDUtQRSJYtCDTIoaXEssXSNIoZ8ssLa9pj7vafw0Ut24V5o0QqrDZf-moiydS3gQFsckGxphxX6Ujopj88iCWzxvhRs_De7wgpXPielH_1rgnAkH3EC/s1600/MainImagexx2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;449&quot; data-original-width=&quot;842&quot; height=&quot;212&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivTx_2sOnf0Gf-xT-gjS71fXX8MFDUtQRSJYtCDTIoaXEssXSNIoZ8ssLa9pj7vafw0Ut24V5o0QqrDZf-moiydS3gQFsckGxphxX6Ujopj88iCWzxvhRs_De7wgpXPielH_1rgnAkH3EC/s400/MainImagexx2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This is an example of media player created in Delphi using VLC multimedia player ActiveX library.&lt;br /&gt;
&lt;br /&gt;
For this to work VLC player and its ActiveX library must be installed.&lt;br /&gt;
https://www.videolan.org/vlc/&lt;br /&gt;
&lt;br /&gt;
Then it is necessary to import ActiveX component in Delphi.&lt;br /&gt;
&lt;br /&gt;
Detailed instruction can be seen in this video :&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/_8ZZd-1pI5Q&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;br /&gt;

&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:568px;height:60px&quot;
     data-ad-client=&quot;ca-pub-1298149506906421&quot;
     data-ad-slot=&quot;5928500521&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;

Fallowing&amp;nbsp;is source code for this example :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;(code style formatted by&amp;nbsp;http://hilite.me/ )&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;

&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;unit&lt;/span&gt; MainForm&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;interface&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
  Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Messages&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Variants&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Graphics&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Dialogs&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; StdCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ExtCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; OleCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; AXVLC_TLB&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
  TfrmMain &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt;(TForm)
    VLCPlugin21&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TVLCPlugin2&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TListBox&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Panel1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Splitter1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TSplitter&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TOpenDialog&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Edit1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;ListBox1DblClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button3Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;private&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Private declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;public&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Public declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  frmMain&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TfrmMain&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;implementation&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.dfm}&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Execute() &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
VLCPlugin21&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;playlist&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;stop&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
VLCPlugin21&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;playlist&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AddStrings(OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Files)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
fnamePr&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;WideString&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
fname&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;WideString&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
id&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SelCount&lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #888888;&quot;&gt;//if sellection is different than zero&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
fnamePr&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;file:///&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;   &lt;span style=&quot;color: #888888;&quot;&gt;//For local files we have to add this in the prefix of file name&lt;/span&gt;
fname&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items[ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ItemIndex]&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
fname&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;StringReplace&lt;/span&gt;(fname&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;/&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;\\&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;[rfReplaceAll]) &lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #888888;&quot;&gt;//we have to replace right&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;//slashes with two left&lt;/span&gt;
fname&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;fnamePr&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;fname&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #888888;&quot;&gt;//combine these to strings to file name&lt;/span&gt;
Label1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;fname&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
VLCPlugin21&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;playlist&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;stop&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #888888;&quot;&gt;//stop playback&lt;/span&gt;
VLCPlugin21&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;playlist&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #888888;&quot;&gt;//clear playlist.You don&#39;t need to do this, you can just&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;//add new files to the playlist.&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;//For the sake of simplicity I am doing this way.&lt;/span&gt;
id&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;VLCPlugin21&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;playlist&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;add(&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;PChar&lt;/span&gt;(fname)&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;null&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;null)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
VLCPlugin21&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;playlist&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;playItem(id)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button3Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; id&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
VLCPlugin21&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;playlist&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;stop&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
VLCPlugin21&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;playlist&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
id&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;VLCPlugin21&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;playlist&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;add(&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;PChar&lt;/span&gt;(Edit1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;null&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;null)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
VLCPlugin21&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;playlist&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;playItem(id)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;ListBox1DblClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Button2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Click&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:568px;height:60px&quot;
     data-ad-client=&quot;ca-pub-1298149506906421&quot;
     data-ad-slot=&quot;5928500521&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;
</description><link>https://xkobyx.blogspot.com/2017/10/media-player-with-vlc-activex-type.html</link><author>noreply@blogger.com (kobyx)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivTx_2sOnf0Gf-xT-gjS71fXX8MFDUtQRSJYtCDTIoaXEssXSNIoZ8ssLa9pj7vafw0Ut24V5o0QqrDZf-moiydS3gQFsckGxphxX6Ujopj88iCWzxvhRs_De7wgpXPielH_1rgnAkH3EC/s72-c/MainImagexx2.png" height="72" width="72"/><thr:total>7</thr:total><georss:featurename>New York, NY, USA</georss:featurename><georss:point>40.7127753 -74.0059728</georss:point><georss:box>12.402541463821152 -109.1622228 69.023009136178842 -38.849722799999995</georss:box></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-3046611793514335448</guid><pubDate>Mon, 25 Sep 2017 21:33:00 +0000</pubDate><atom:updated>2020-10-23T11:48:17.276-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Delphi</category><title>Music Player using BASS library  Delphi tutorial (Tip for 10 )</title><description>&lt;b:if cond=&quot;data:blog.url == &amp;quot;https://xkobyx.blogspot.com/&amp;quot;&quot;&gt;


&lt;/b:if&gt;

&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLyFxp4NPuSMoE9DIKiQIbdsEBSaSChleZ8SEcQ3maFUCATYES6jMhrEvu9NAKucGdFn22XJ0dl5D10NmWG0OuOZUsogUKyt3BSGxwVZO5GNNujRZMZAlmBNLE-auoXkpXBhWWpY1fff1p/s1600/main.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;428&quot; data-original-width=&quot;849&quot; height=&quot;201&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLyFxp4NPuSMoE9DIKiQIbdsEBSaSChleZ8SEcQ3maFUCATYES6jMhrEvu9NAKucGdFn22XJ0dl5D10NmWG0OuOZUsogUKyt3BSGxwVZO5GNNujRZMZAlmBNLE-auoXkpXBhWWpY1fff1p/s400/main.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Delphi mp3 music player&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Example how to create mp3 player with Delphi and BASS library.&lt;br /&gt;
&lt;br /&gt;
BASS library can be downloaded from :&lt;br /&gt;
http://www.un4seen.com/&lt;br /&gt;
&lt;br /&gt;
In this video you can see in detail how to create such mp3 player.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&amp;nbsp;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;270&quot; src=&quot;https://www.youtube.com/embed/QW0rImEFXUE&quot; width=&quot;480&quot;&gt;&lt;/iframe&gt;

&lt;/div&gt;
And following is source code of this example.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;(code style formatted by&amp;nbsp;http://hilite.me/ )&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;unit&lt;/span&gt; MainForm&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;interface&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
  Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Messages&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Variants&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Graphics&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Dialogs&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; StdCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; bass&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
  TfrmMain &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt;(TForm)
    ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TListBox&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button4&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Stop&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TOpenDialog&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button3Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button4Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormClose&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; Action&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TCloseAction)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;StopClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;private&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Error&lt;/span&gt;(msg&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;string&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;public&lt;/span&gt;
    channel&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;HSTREAM&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  frmMain&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TfrmMain&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;implementation&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.dfm}&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Error&lt;/span&gt;(msg&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;string&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
 s&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
 s &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; msg &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #0044dd;&quot;&gt;#13#10&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;(Error code: &#39;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;IntToStr&lt;/span&gt;(BASS_ErrorGetCode) &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;)&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 MessageBox(Handle&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;PChar&lt;/span&gt;(s)&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;nil&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
i&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Execute() &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
BASS_ChannelStop(channel)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; I &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;to&lt;/span&gt; OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Files&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Count&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
 ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Files[i])&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; channel&lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
BASS_StreamFree(channel)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;  &lt;span style=&quot;color: #888888;&quot;&gt;//destroy any previous channel if exists&lt;/span&gt;
channel&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
channel &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; BASS_StreamCreateFile(&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;FALSE&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;PChar&lt;/span&gt;(ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items[ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ItemIndex])&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;BASS_UNICODE)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;//create the stream&lt;/span&gt;
BASS_ChannelPlay(channel&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;false&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #888888;&quot;&gt;// play the stream&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button3Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ItemIndex&lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Selected[ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ItemIndex&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ItemIndex&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Selected[ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Count&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Button2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Click&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button4Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ItemIndex&lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt;ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Count&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Selected[ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ItemIndex&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ItemIndex&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Count&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Selected[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Button2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Click&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormClose&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; Action&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TCloseAction)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
 &lt;span style=&quot;color: #888888;&quot;&gt;// Close BASS&lt;/span&gt;
 BASS_Free()&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  &lt;span style=&quot;color: #888888;&quot;&gt;// check the correct BASS was loaded&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (HIWORD(BASS_GetVersion) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt; BASSVERSION) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  MessageBox(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;An incorrect version of BASS.DLL was loaded&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;nil&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;MB_ICONERROR)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #007020;&quot;&gt;Halt&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

 &lt;span style=&quot;color: #888888;&quot;&gt;// Initialize audio - default device, 44100hz, stereo, 16 bits&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;not&lt;/span&gt; BASS_Init(&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;44100&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Handle&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;nil&lt;/span&gt;) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
  Error(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Error initializing audio!&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;StopClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
BASS_ChannelStop(channel)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
</description><enclosure type='mp4' url='https://youtu.be/QW0rImEFXUE' length='0'/><link>https://xkobyx.blogspot.com/2017/09/music-player-using-bass-library-delphi.html</link><author>noreply@blogger.com (kobyx)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLyFxp4NPuSMoE9DIKiQIbdsEBSaSChleZ8SEcQ3maFUCATYES6jMhrEvu9NAKucGdFn22XJ0dl5D10NmWG0OuOZUsogUKyt3BSGxwVZO5GNNujRZMZAlmBNLE-auoXkpXBhWWpY1fff1p/s72-c/main.png" height="72" width="72"/><thr:total>18</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-1342210453090159540</guid><pubDate>Tue, 15 Aug 2017 08:39:00 +0000</pubDate><atom:updated>2022-07-15T00:59:21.723-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Delphi tutorial</category><category domain="http://www.blogger.com/atom/ns#">export data to excel</category><category domain="http://www.blogger.com/atom/ns#">Export database</category><category domain="http://www.blogger.com/atom/ns#">Export database to Excel Delphi tutorial</category><category domain="http://www.blogger.com/atom/ns#">export sql to</category><category domain="http://www.blogger.com/atom/ns#">export to excel</category><category domain="http://www.blogger.com/atom/ns#">importing ex</category><category domain="http://www.blogger.com/atom/ns#">sql import from excel</category><category domain="http://www.blogger.com/atom/ns#">sql query export to excel</category><title>Export sql database to Excel Delphi tutorial (Tip for 10 )</title><description>&lt;b:if cond=&quot;data:blog.url == &amp;quot;https://xkobyx.blogspot.com/&amp;quot;&quot;&gt;


&lt;/b:if&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCUz26QzH9JEcMOQrxb2P0KR9Ff-1MXtXp3L7FfIVW33nzIisPuB6lMriz_8m8jbTIoR7CVC8LZvwB0VVKhybGIt7llPcTXqpc5e-TrnylmQYRyLLUuJPz9AqLNWJI1v1KHc04XOMZCpn2/s1600/MainImage.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;546&quot; data-original-width=&quot;1060&quot; height=&quot;205&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCUz26QzH9JEcMOQrxb2P0KR9Ff-1MXtXp3L7FfIVW33nzIisPuB6lMriz_8m8jbTIoR7CVC8LZvwB0VVKhybGIt7llPcTXqpc5e-TrnylmQYRyLLUuJPz9AqLNWJI1v1KHc04XOMZCpn2/s400/MainImage.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;script async=&quot;&quot; src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1298149506906421&quot; data-ad-slot=&quot;5928500521&quot; style=&quot;display: inline-block; height: 60px; width: 568px;&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
An example of exporting sql database table ( in this case sqlite table ) to MS Excel.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Link to full source : &lt;a href=&quot;https://drive.google.com/file/d/1lqA1mJjgCIuwxwbL3t5Q_Xm9bzFFj8ku/view?usp=sharing&quot; target=&quot;_blank&quot;&gt;Source code&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Here we use previous example which we upgrade with new function used for exporting data.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;As always , here is video tutorial to watch, following with full source of this example.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&amp;nbsp;

&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;270&quot; src=&quot;https://www.youtube.com/embed/KOy1nebALWw&quot; width=&quot;480&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;(code style formatted by&amp;nbsp;http://hilite.me/ )&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script async=&quot;&quot; src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1298149506906421&quot; data-ad-slot=&quot;5928500521&quot; style=&quot;display: inline-block; height: 60px; width: 568px;&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;
&lt;!--HTML generated using hilite.me--&gt;&lt;br /&gt;
&lt;div style=&quot;background: rgb(255, 255, 255); border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;unit&lt;/span&gt; MainForm&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;interface&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
  Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Messages&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Variants&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Graphics&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Dialogs&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; StdCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Grids&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; DBGrids&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; DB&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ZAbstractRODataset&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ZAbstractDataset&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  ZDataset&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ZAbstractConnection&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ZConnection&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ComObj&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ExcelXP&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ComCtrls&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
  TfrmMain &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt;(TForm)
    ZConn&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TZConnection&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TZQuery&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    ZQuery2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TZQuery&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    DataSource1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TDataSource&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    DBGrid1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TDBGrid&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TComboBox&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Edit1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label4&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Edit2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label5&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Edit3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label6&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Edit4&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button4&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button5&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label7&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label8&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button6&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    ProgressBar1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TProgressBar&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    SaveDialog1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TSaveDialog&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;ComboBox1Change&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button3Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button4Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button5Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;DBGrid1CellClick&lt;/span&gt;(Column&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TColumn)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;ExportTableToExcel&lt;/span&gt;(Tablex&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TZQuery&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;sFile&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;string&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button6Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;private&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Private declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;public&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Public declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  frmMain&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TfrmMain&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;implementation&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.dfm}&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;ExportTableToExcel&lt;/span&gt;(Tablex&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TZQuery&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;sFile&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;string&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;//Declarations&lt;/span&gt;
 ExcelApplication &lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;variant&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 Sheet &lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;variant&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 column&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; row &lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;rowsno&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 FormatFloatY&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;WideString&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 ValXX&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;WideString&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Cursor&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;crHourGlass&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;try&lt;/span&gt;   &lt;span style=&quot;color: #888888;&quot;&gt;//Try to create Excel application&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
   ExcelApplication &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; CreateOleObject(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Excel.Application&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   ExcelApplication&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Visible &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;  &lt;span style=&quot;color: #888888;&quot;&gt;//let&#39;s make visible&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;except&lt;/span&gt;
 &lt;span style=&quot;color: #888888;&quot;&gt;//If failed then show warning&lt;/span&gt;
  Showmessage(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Cannot create an Excel file,&#39;&lt;/span&gt;
  &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;make sure that MS Excel is installed on your system&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Application&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Terminate&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

 rowsno&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Tablex&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;RecordCount&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;   &lt;span style=&quot;color: #888888;&quot;&gt;//records number in a table&lt;/span&gt;
 Tablex&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;RecNo&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #888888;&quot;&gt;//set table to first record&lt;/span&gt;
 ExcelApplication&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;WorkBooks&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4167&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;   &lt;span style=&quot;color: #888888;&quot;&gt;//Add excel workbook&lt;/span&gt;
 ExcelApplication&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;WorkBooks[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;WorkSheets[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Name &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;my data&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 Sheet &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; ExcelApplication&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;WorkBooks[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;WorkSheets[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;my data&#39;&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

 &lt;span style=&quot;color: #888888;&quot;&gt;//Format cells in excel sheet&lt;/span&gt;
 Sheet&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Range[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;A1:C&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;IntToStr&lt;/span&gt;(rowsno&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;)]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Borders&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;LineStyle &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;7&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 Sheet&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Range[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;A1:C&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;IntToStr&lt;/span&gt;(rowsno&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;)]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Borders&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;color &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; clblue&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

Sheet&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Range[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;B2:B&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;IntToStr&lt;/span&gt;(rowsno&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;)]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;HorizontalAlignment &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;xlLeft&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      &lt;span style=&quot;color: #888888;&quot;&gt;//colors of cells in first line&lt;/span&gt;
Sheet&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Cells[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Interior&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; clMoneyGreen&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Sheet&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Cells[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Interior&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; clMoneyGreen&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Sheet&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Cells[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Interior&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Color &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; clMoneyGreen&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
                          &lt;span style=&quot;color: #888888;&quot;&gt;//widths of columns&lt;/span&gt;
Sheet&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Columns[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ColumnWidth &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;30&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Sheet&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Columns[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ColumnWidth &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;30&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Sheet&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Columns[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ColumnWidth &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;30&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
            &lt;span style=&quot;color: #888888;&quot;&gt;//captions/text of cells&lt;/span&gt;
Sheet&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Cells[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;ID&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Sheet&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Cells[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;NAME&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Sheet&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Cells[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;SURNAME&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

   &lt;span style=&quot;color: #888888;&quot;&gt;//set progressbar max value = teble records count&lt;/span&gt;
ProgressBar1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;max&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Tablex&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;RecordCount&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ProgressBar1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;position&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;  &lt;span style=&quot;color: #888888;&quot;&gt;//set position to 0=start&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;//now copy from table to excel cells&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; row &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;to&lt;/span&gt; Tablex&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;RecordCount &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Sheet&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Cells[row&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; Tablex&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Fields[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AsString&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #888888;&quot;&gt;//row+1 = move to the next line&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;//in column one&lt;/span&gt;
Sheet&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Cells[row&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Tablex&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Fields[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AsString&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;//row+1 = move to the next line&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;//in column two&lt;/span&gt;
Sheet&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Cells[row&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; Tablex&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Fields[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AsString&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;//row+1 = move to the next line&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;//in column three&lt;/span&gt;
ProgressBar1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;position&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;row&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #888888;&quot;&gt;//set progress bar position&lt;/span&gt;
Tablex&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Next&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;  &lt;span style=&quot;color: #888888;&quot;&gt;//go to the next record in a table&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Screen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Cursor&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;crDefault&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;  &lt;span style=&quot;color: #888888;&quot;&gt;//set default cursor&lt;/span&gt;
ProgressBar1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;position&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #888888;&quot;&gt;//it is done , set PB to the begining&lt;/span&gt;
&lt;span style=&quot;color: #007020;&quot;&gt;DeleteFile&lt;/span&gt;(sFile)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;  &lt;span style=&quot;color: #888888;&quot;&gt;//&lt;/span&gt;
Sheet&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SaveAs(sFile)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;   &lt;span style=&quot;color: #888888;&quot;&gt;//Save excel file&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;  ExcelApplication.Quit; //Quit excel&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;  ExcelApplication := Unassigned;  //to be sure that no hidden excel in memory&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;  Sheet := Unassigned;&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;//let&#39;s close manually&lt;/span&gt;
Screen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Cursor&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;crDefault&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;  &lt;span style=&quot;color: #888888;&quot;&gt;//set default cursor&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;//let&#39;s test&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;//a bit slow while screen capturing&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;


&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
SaveDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;InitialDir&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;ExtractFilePath&lt;/span&gt;(Application&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExeName)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ZConn&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Protocol&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;sqlite-3&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZConn&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;LibraryLocation&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;ExtractFilePath&lt;/span&gt;(Application&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExeName)&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;sqlite3.dll&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;not&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;FileExists&lt;/span&gt;(ZConn&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;LibraryLocation) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Exit&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZConn&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Database&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;ExtractFilePath&lt;/span&gt;(Application&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExeName)&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;testdb.s3db&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;//if not FileExists(ZConn.Database) then Exit;&lt;/span&gt;
ZConn&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Connect&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;testdb.s3db&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZConn&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;GetTableNames(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ItemIndex&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;OnChange(&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Self&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Close&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;CREATE TABLE if not exists testtbl(id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,&#39;&lt;/span&gt;
&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;name VARCHAR(255),surname VARCHAR(255), UNIQUE(id))&#39;&lt;/span&gt;) &lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExecSQL&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZConn&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;GetTableNames(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ItemIndex&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;OnChange(&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Self&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button3Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; Edit1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;&#39;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
 ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Insert into testtbl(name,surname) values(&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;QuotedStr&lt;/span&gt;(Edit1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;,&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;QuotedStr&lt;/span&gt;(Edit2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;)&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExecSQL&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;OnChange(&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Self&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button4Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Update testtbl set name=&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;QuotedStr&lt;/span&gt;(Edit3&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;,surname=&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;QuotedStr&lt;/span&gt;(Edit4&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)
&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39; where id=&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;QuotedStr&lt;/span&gt;(Label8&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption))&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExecSQL&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;OnChange(&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Self&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button5Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ZQuery2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Delete&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button6Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; SaveDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Execute() &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ExportTableToExcel(ZQuery2&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;SaveDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FileName)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;ComboBox1Change&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ZQuery2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Close&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Select * from &#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Open&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; I &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;to&lt;/span&gt; DBGrid1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Columns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Count&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
 DBGrid1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Columns[i]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;DBGrid1CellClick&lt;/span&gt;(Column&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TColumn)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Edit3&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ZQuery2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FieldByName(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;name&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AsString&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Edit4&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ZQuery2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FieldByName(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;surname&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AsString&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
label8&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ZQuery2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FieldByName(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;id&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AsString&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;script async=&quot;&quot; src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1298149506906421&quot; data-ad-slot=&quot;5928500521&quot; style=&quot;display: inline-block; height: 60px; width: 568px;&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;
&lt;/div&gt;</description><link>https://xkobyx.blogspot.com/2017/08/export-database-to-excel-delphi-tutorial.html</link><author>noreply@blogger.com (kobyx)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCUz26QzH9JEcMOQrxb2P0KR9Ff-1MXtXp3L7FfIVW33nzIisPuB6lMriz_8m8jbTIoR7CVC8LZvwB0VVKhybGIt7llPcTXqpc5e-TrnylmQYRyLLUuJPz9AqLNWJI1v1KHc04XOMZCpn2/s72-c/MainImage.png" height="72" width="72"/><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-2030187698404841189</guid><pubDate>Tue, 09 May 2017 21:18:00 +0000</pubDate><atom:updated>2020-10-23T11:48:17.303-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Delphi</category><title>Video Player using Direct Show DSPack component for Delphi (Tip for 10 )</title><description>&lt;b:if cond=&quot;data:blog.url == &amp;quot;https://xkobyx.blogspot.com/&amp;quot;&quot;&gt;


&lt;/b:if&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUQ7wPei57TmnIFe6ZplActMl9HDMn_jPfhny_f6YC4EmCp5h5m-eB_d2jN-m6SJEXEUw1e3qBjXJzm-GaNuGuTB0XTO3iXOTWExKWHx-6I5X2gAwpfNRNiDCj7PYPd2c2wScgfCzsuBxO/s1600/Main.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUQ7wPei57TmnIFe6ZplActMl9HDMn_jPfhny_f6YC4EmCp5h5m-eB_d2jN-m6SJEXEUw1e3qBjXJzm-GaNuGuTB0XTO3iXOTWExKWHx-6I5X2gAwpfNRNiDCj7PYPd2c2wScgfCzsuBxO/s400/Main.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
- Example of media player created with Delphi and DSPack components.&lt;br /&gt;
&lt;br /&gt;
- You can download component from: https://github.com/ms301/dspack&lt;br /&gt;
&lt;br /&gt;
- You should also download ffdshow from the following location :&lt;br /&gt;
https://sourceforge.net/projects/ffdshow-tryout/?source=directory&lt;br /&gt;
&lt;br /&gt;
- Detailed procedure of video player creation is shown in the following video :&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/nznzV7OIi84&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;br /&gt;
- Also full source code is listed below :&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;(code style formatted by&amp;nbsp;http://hilite.me/ )&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;unit&lt;/span&gt; MainForm&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;interface&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
  Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Messages&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Variants&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Graphics&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Dialogs&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ComCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; DSPack&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ExtCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; StdCtrls&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
  TfrmMain &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt;(TForm)
    Panel1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Panel2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Open&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Stop&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Play&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Pause&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Timer1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TTimer&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    OPD&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TOpenDialog&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    FilterGraph1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TFilterGraph&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    VideoW&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TDSVideoWindowEx2&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    PBar&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TProgressBar&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;OpenClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;StopClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;PauseClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;PlayClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Timer1Timer&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;PBarMouseDown&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Button&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TMouseButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      Shift&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TShiftState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;PBarMouseUp&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Button&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TMouseButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      Shift&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TShiftState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;private&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Private declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;public&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Public declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  frmMain&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TfrmMain&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  PBDown&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Boolean&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;implementation&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.dfm}&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
OPD&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;InitialDir&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;ExtractFilePath&lt;/span&gt;(Application&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExeName)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
FilterGraph1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Active&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;OpenClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; OPD&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Execute() &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;

Timer1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Enabled&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
FilterGraph1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ClearGraph&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
FilterGraph1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Stop&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
FilterGraph1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;RenderFile(OPD&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FileName)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
PBar&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Max&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;FilterGraph1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Duration&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
FilterGraph1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Play&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Timer1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Enabled&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;PauseClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
FilterGraph1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Pause&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Timer1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Enabled&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;PBarMouseDown&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Button&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TMouseButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Shift&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TShiftState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
PBDown&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;PBarMouseUp&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Button&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TMouseButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Shift&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TShiftState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  Ratio&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Real&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Total&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Position&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; PBDown&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;true&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Ratio&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;X&lt;span style=&quot;color: #333333;&quot;&gt;/&lt;/span&gt;PBar&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ClientWidth&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Total&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;Round&lt;/span&gt;(PBar&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Max&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;Pbar&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Min)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Position&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;Round&lt;/span&gt;((Total&lt;span style=&quot;color: #333333;&quot;&gt;*&lt;/span&gt;Ratio)&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;Round&lt;/span&gt;(PBar&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Min))&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
PBar&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Position&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Position&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
FilterGraph1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Position&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;Round&lt;/span&gt;(PBar&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Position)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
PBDown&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;PlayClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
FilterGraph1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Play&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Timer1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Enabled&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;StopClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
FilterGraph1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Stop&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
FilterGraph1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ClearGraph&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
PBar&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Position&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Timer1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Enabled&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Timer1Timer&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
PBar&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Position&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;FilterGraph1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Position&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
</description><link>https://xkobyx.blogspot.com/2017/05/video-player-using-direct-show-dspack.html</link><author>noreply@blogger.com (kobyx)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUQ7wPei57TmnIFe6ZplActMl9HDMn_jPfhny_f6YC4EmCp5h5m-eB_d2jN-m6SJEXEUw1e3qBjXJzm-GaNuGuTB0XTO3iXOTWExKWHx-6I5X2gAwpfNRNiDCj7PYPd2c2wScgfCzsuBxO/s72-c/Main.png" height="72" width="72"/><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-6956841596581120924</guid><pubDate>Mon, 17 Apr 2017 19:47:00 +0000</pubDate><atom:updated>2020-10-23T11:48:17.320-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Delphi</category><title>VirtualStringTree as Grid - Delphi tutorial (Tip for 10 )</title><description>&lt;b:if cond=&quot;data:blog.url == &amp;quot;https://xkobyx.blogspot.com/&amp;quot;&quot;&gt;


&lt;/b:if&gt;
&lt;br /&gt;
In this example you can learn how to use Virtualstringtree from GemSoft as a Grid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/hcdHFPTn-zs&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;

&lt;/div&gt;
This component can be used as a regular tree view but also as string grid,so it can replace regular stringgrid and dbgrid, but with much higher speed.&lt;br /&gt;
Not to mention customization.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Virtualstringtree is known for its speed, so adding 1000 or 10000 nodes takes a bit of a second.&lt;br /&gt;
&lt;br /&gt;
In this tutorial you can learn how to variable columns and rows number, meaning to use variable data that should be shown, for example database table records etc.&lt;br /&gt;
&lt;br /&gt;
Full source for this example can be found below&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;(code style formatted by&amp;nbsp;http://hilite.me/ )&lt;/span&gt;&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;unit&lt;/span&gt; MainForm&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;interface&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
  Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Messages&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Variants&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Graphics&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Dialogs&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; StdCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; VirtualTrees&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
  TfrmMain &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt;(TForm)
    VST&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TVirtualStringTree&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    txtColNumb&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    txtRowNumb&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    chkAddAsNew&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TCheckBox&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    cmdAddData&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;VSTColumnsCreate&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;VSTGetText&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TBaseVirtualTree&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Node&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; PVirtualNode&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      Column&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TColumnIndex&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; TextType&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TVSTTextType&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; CellText&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;string&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdAddDataClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;private&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Private declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;public&lt;/span&gt;
  ColNumb&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;RowNumb&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
  PMyRec&lt;span style=&quot;color: #333333;&quot;&gt;=^&lt;/span&gt;TMyRec&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  TstrArr&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;array&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;of&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  TMyRec&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;packed&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;record&lt;/span&gt;
  ArrOfStr&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TstrArr&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  frmMain&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TfrmMain&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;implementation&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.dfm}&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdAddDataClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
node&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;PVirtualNode&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
MyRecord&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;PMyRec&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
i&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;j&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;StrToInt&lt;/span&gt;(txtColNumb&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
VST&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Exit&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

ColNumb&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;StrToInt&lt;/span&gt;(txtColNumb&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
RowNumb&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;StrToInt&lt;/span&gt;(txtRowNumb&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

VSTColumnsCreate&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; chkAddAsNew&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Checked&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;true&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;   VST&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; j &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;to&lt;/span&gt; RowNumb &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  node&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;VST&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AddChild(&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;nil&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  MyRecord&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;VST&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;GetNodeData(node)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #007020;&quot;&gt;SetLength&lt;/span&gt;(MyRecord&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ArrOfStr&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;ColNumb)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; i&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;to&lt;/span&gt; ColNumb&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt;
  MyRecord&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ArrOfStr[i]&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Field &#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;IntToStr&lt;/span&gt;(j)&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;:&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;IntToStr&lt;/span&gt;(i)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
VST&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;EndUpdate&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;VSTColumnsCreate&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; i&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
VST&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;BeginUpdate&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;with&lt;/span&gt; VST&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Header &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  Columns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;to&lt;/span&gt; ColNumb&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt;  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
    Columns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Columns[i]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Columns[i]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Column &#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;IntToStr&lt;/span&gt;(i)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
VST&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;EndUpdate&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;VSTGetText&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TBaseVirtualTree&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Node&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; PVirtualNode&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Column&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TColumnIndex&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; TextType&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TVSTTextType&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; CellText&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;string&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  MyRecord&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;PMyRec&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  i&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
MyRecord&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Sender&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;GetNodeData(Node)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;to&lt;/span&gt; ColNumb&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;

  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; ( Column&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;i) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; CellText&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;MyRecord&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ArrOfStr[i]&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
</description><link>https://xkobyx.blogspot.com/2017/04/virtualstringtree-as-grid-delphi.html</link><author>noreply@blogger.com (kobyx)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/hcdHFPTn-zs/default.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-559618954930538237</guid><pubDate>Thu, 02 Feb 2017 19:19:00 +0000</pubDate><atom:updated>2020-10-23T11:48:17.328-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Delphi</category><title>Form in a DLL file   Delphi tutorials (Tip for 10 )</title><description>&lt;b:if cond=&quot;data:blog.url == &amp;quot;https://xkobyx.blogspot.com/&amp;quot;&quot;&gt;


&lt;/b:if&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg40pOodnCwSngMrURT5aa6prV56ms-kMiAfMWPyoQUFaPHCZYokTG7ixm75Zpb_5QDmOoeQHEWXVMFlvKl4DoR6nAUEJ96eenATLkrEj0O3nGvAsh2M3qmj2wbhRqLYtDGR1sK-bwhILnl/s1600/Main.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;181&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg40pOodnCwSngMrURT5aa6prV56ms-kMiAfMWPyoQUFaPHCZYokTG7ixm75Zpb_5QDmOoeQHEWXVMFlvKl4DoR6nAUEJ96eenATLkrEj0O3nGvAsh2M3qmj2wbhRqLYtDGR1sK-bwhILnl/s400/Main.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;br /&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:568px;height:60px&quot;
     data-ad-client=&quot;ca-pub-1298149506906421&quot;
     data-ad-slot=&quot;5928500521&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;

In this example you can see how to create dll file with form in it , and call this form from host application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;270&quot; src=&quot;https://www.youtube.com/embed/seTGSdkXsMQ&quot; width=&quot;480&quot;&gt;&lt;/iframe&gt;

&lt;/div&gt;
&lt;br /&gt;
Following is the source code :&lt;br /&gt;
&lt;br /&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:568px;height:60px&quot;
     data-ad-client=&quot;ca-pub-1298149506906421&quot;
     data-ad-slot=&quot;5928500521&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;

&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;(code style formatted by&amp;nbsp;http://hilite.me/ )&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;FormInDLL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;dpr

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;library&lt;/span&gt; FormInDLL&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{ Important note about DLL memory management: ShareMem must be the&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;  first unit in your library&#39;s USES clause AND your project&#39;s (select&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;  Project-View Source) USES clause if your DLL exports any procedures or&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;  functions that pass strings as parameters or function results. This&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;  applies to all strings passed to and from your DLL--even those that&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;  are nested in records and classes. ShareMem is the interface unit to&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;  the BORLNDMM.DLL shared memory manager, which must be deployed along&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;  with your DLL. To avoid using BORLNDMM.DLL, pass string information&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;  using PChar or ShortString parameters. }&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
  FastMM4&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  FastShareMem&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  formDLL &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;formDLL.pas&#39;&lt;/span&gt; &lt;span style=&quot;color: #888888;&quot;&gt;{DllForm}&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.res}&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Create_Form&lt;/span&gt;(pn&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;HWND)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
DllForm&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;TDllForm&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;CreateParented(pn)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
DllForm&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;BorderStyle&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;bsNone&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
DllForm&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Show&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Size_Form&lt;/span&gt;(pnh&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;pnw&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
DllForm&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;pnh&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
DllForm&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;pnw&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;exports&lt;/span&gt;
Create_Form&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Size_Form&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;

formDLL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;pas

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;unit&lt;/span&gt; formDLL&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;interface&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
  Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Messages&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Variants&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Graphics&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Dialogs&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ExtCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; StdCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; jpeg&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; pngimage&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; GifImage&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
  TDllForm &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt;(TForm)
    Button1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TOpenDialog&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Image1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TImage&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormClose&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; Action&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TCloseAction)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;private&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Private declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;public&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Public declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  DllForm&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TDllForm&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;implementation&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.dfm}&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TDllForm&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Execute() &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Image1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Picture&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;LoadFromFile(OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FileName)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TDllForm&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormClose&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; Action&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TCloseAction)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Action&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;caFree&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;


Host Application &lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;unit&lt;/span&gt; MainForm&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;interface&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
  Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Messages&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Variants&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Graphics&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Dialogs&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; StdCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ExtCtrls&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
  TfrmMain &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt;(TForm)
    Panel1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormResize&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;private&lt;/span&gt;
    DLLFormCreated&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Boolean&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;public&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Public declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Create_Form&lt;/span&gt;(pn&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;HWND)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;external&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;FormInDLL.dll&#39;&lt;/span&gt; &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;name&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Create_Form&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Size_Form&lt;/span&gt;(pnh&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;pnw&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;external&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;FormInDLL.dll&#39;&lt;/span&gt; &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;name&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Size_Form&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  frmMain&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TfrmMain&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;implementation&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.dfm}&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Create_Form(Panel1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Handle)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #888888;&quot;&gt;// call procedure in DLL, create DLL form in Panel&lt;/span&gt;
Size_Form(Panel1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Panel1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #888888;&quot;&gt;// call procedure in DLL&lt;/span&gt;
DLLFormCreated&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Button1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Hide&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
DLLFormCreated&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormResize&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; DLLFormCreated&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
 Size_Form(Panel1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Height&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Panel1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #888888;&quot;&gt;// call procedure in DLL&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:568px;height:60px&quot;
     data-ad-client=&quot;ca-pub-1298149506906421&quot;
     data-ad-slot=&quot;5928500521&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;
</description><link>https://xkobyx.blogspot.com/2017/02/form-in-dll-file-delphi-tutorials.html</link><author>noreply@blogger.com (kobyx)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg40pOodnCwSngMrURT5aa6prV56ms-kMiAfMWPyoQUFaPHCZYokTG7ixm75Zpb_5QDmOoeQHEWXVMFlvKl4DoR6nAUEJ96eenATLkrEj0O3nGvAsh2M3qmj2wbhRqLYtDGR1sK-bwhILnl/s72-c/Main.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-1678706804684673481</guid><pubDate>Fri, 30 Dec 2016 15:28:00 +0000</pubDate><atom:updated>2020-10-23T11:48:17.337-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Delphi</category><title>Media Player - Delphi tutorial (Tip for 10 )</title><description>&lt;b:if cond=&quot;data:blog.url == &amp;quot;https://xkobyx.blogspot.com/&amp;quot;&quot;&gt;


&lt;/b:if&gt;
&lt;b:if cond=&quot;data:blog.url == &amp;quot;https://xkobyx.blogspot.com/&amp;quot;&quot;&gt;
&lt;/b:if&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwRntUU1aJbYu9mJZ6zpPwD5rdnYFzwFUv8uoJQyrGHE5OnnWXvHYKYccEhVanP_1N00H9oKrS_28f3ls-QTOiRtT_JQnGUCoyEodlmViV4VHrfnx0jsjQi8oj95TE2YM1Rg77Oh25Cgbr/s1600/Delphi-Media+Player.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;156&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwRntUU1aJbYu9mJZ6zpPwD5rdnYFzwFUv8uoJQyrGHE5OnnWXvHYKYccEhVanP_1N00H9oKrS_28f3ls-QTOiRtT_JQnGUCoyEodlmViV4VHrfnx0jsjQi8oj95TE2YM1Rg77Oh25Cgbr/s400/Delphi-Media+Player.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/8Rk6mo6x3_c&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;

&lt;/div&gt;
Delphi example showing how to create Media Player.&lt;br /&gt;
Here you can see how to create Media Player with which you can play music and video files. &lt;br /&gt;
It is quite simple and easy way to do this with Delphi.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Following is the source code of this example :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;unit&lt;/span&gt; MainForm&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;interface&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
  Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Messages&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Variants&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Graphics&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Dialogs&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; StdCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; MPlayer&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ExtCtrls&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
  TfrmMain &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt;(TForm)
    Panel1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Panel2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TOpenDialog&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    MediaPlayer1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TMediaPlayer&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    ScrollBar1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TScrollBar&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Timer1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TTimer&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Timer1Timer&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Panel2Resize&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;ScrollBar1Scroll&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; ScrollCode&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TScrollCode&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; ScrollPos&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;private&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Private declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;public&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Public declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  frmMain&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TfrmMain&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;implementation&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.dfm}&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;InitialDir&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;ExtractFilePath&lt;/span&gt;(Application&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExeName)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Execute &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;

Timer1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Enabled&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 MediaPlayer1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FileName&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FileName&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 MediaPlayer1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Open&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 MediaPlayer1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Display&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Panel2&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 MediaPlayer1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;DisplayRect&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Panel2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ClientRect&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 ScrollBar1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Max&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;MediaPlayer1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;TrackLength[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 Timer1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Enabled&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Label1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Parent&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ScrollBar1&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Left&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;Round&lt;/span&gt;(ScrollBar1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Top&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Panel2Resize&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
MediaPlayer1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;DisplayRect&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Panel2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ClientRect&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Left&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;Round&lt;/span&gt;(ScrollBar1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Top&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;ScrollBar1Scroll&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; ScrollCode&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TScrollCode&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; ScrollPos&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
MediaPlayer1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Position&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ScrollBar1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Position&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
MediaPlayer1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Play&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Timer1Timer&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ScrollBar1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Position&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;MediaPlayer1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Position&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;FormatFloat&lt;/span&gt;(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;0#.##&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;(ScrollBar1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Position&lt;span style=&quot;color: #333333;&quot;&gt;/&lt;/span&gt;ScrollBar1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Max)&lt;span style=&quot;color: #333333;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;100&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39; %&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; MediaPlayer1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Position&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;ScrollBar1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Max &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; MediaPlayer1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Stop&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
</description><link>https://xkobyx.blogspot.com/2016/12/media-player-delphi-tutorial.html</link><author>noreply@blogger.com (kobyx)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwRntUU1aJbYu9mJZ6zpPwD5rdnYFzwFUv8uoJQyrGHE5OnnWXvHYKYccEhVanP_1N00H9oKrS_28f3ls-QTOiRtT_JQnGUCoyEodlmViV4VHrfnx0jsjQi8oj95TE2YM1Rg77Oh25Cgbr/s72-c/Delphi-Media+Player.png" height="72" width="72"/><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-1142149079087130390</guid><pubDate>Sun, 18 Dec 2016 19:18:00 +0000</pubDate><atom:updated>2020-10-23T11:48:17.351-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Delphi</category><title>Delphi tutorial  - Tabbed interface (Tip for 10 )</title><description>Delphi example showing how to create tabbed interface.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxShNaoBxeN_a9HHCe4lURPz_GvjOOK5L97wIJsWoK6LVAeZd-2Di5ethA7JEDRQ9C9uxE_ljW9I8ApQYbrlZ5aIjdUaTyq_Ezvibzb-x2Lf8_UjiBSHNgxUZrxlTp9gkFjh4ODMdWhw0/s1600/TabsMain.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;177&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxShNaoBxeN_a9HHCe4lURPz_GvjOOK5L97wIJsWoK6LVAeZd-2Di5ethA7JEDRQ9C9uxE_ljW9I8ApQYbrlZ5aIjdUaTyq_Ezvibzb-x2Lf8_UjiBSHNgxUZrxlTp9gkFjh4ODMdWhw0/s400/TabsMain.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Here you can see how to dynamically create Memo and Picture and put them in Active sheet ( active tab ). &lt;br /&gt;
&lt;br /&gt;
Also some actions with tabs, add, edit caption, move, delete ...&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
In following video you can see whole process of creating this example :&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/xVQardLv5C4&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
Following is full source code and also picture and icon used in the example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBVN-j21CkAgRuxUEh2Ncg5ClGj2Weal9dnOAtRy_AVacMw8kdqAyXPwn2Pu-O_xrGAXvBK1HE58pn49Gx_rOGtKl1QetSp0tLiV7eiamjUs1iI-gZIhpX8V4NHq5N5C5n-i8DEYplB3A/s1600/flower.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;243&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBVN-j21CkAgRuxUEh2Ncg5ClGj2Weal9dnOAtRy_AVacMw8kdqAyXPwn2Pu-O_xrGAXvBK1HE58pn49Gx_rOGtKl1QetSp0tLiV7eiamjUs1iI-gZIhpX8V4NHq5N5C5n-i8DEYplB3A/s320/flower.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeeXYV6AS3CERdSQsxdmMn80BhENb3sp18c2eiqJrQrMBl8ZpFYCxdu8WnUk8PRyLJeFrjERZNMSVwDYObf8vIMYUxCdX8_U0L0UK0kbl9igt9tl3dNtr-sDiA3Rvmf5IM81iCec4bEh8/s1600/tab.ico&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeeXYV6AS3CERdSQsxdmMn80BhENb3sp18c2eiqJrQrMBl8ZpFYCxdu8WnUk8PRyLJeFrjERZNMSVwDYObf8vIMYUxCdX8_U0L0UK0kbl9igt9tl3dNtr-sDiA3Rvmf5IM81iCec4bEh8/s1600/tab.ico&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;(code style formatted by http://hilite.me/ )&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;unit&lt;/span&gt; MainForm&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;interface&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
  Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Messages&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Variants&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Graphics&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Dialogs&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; StdCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ComCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ImgList&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ExtCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; jpeg&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
  TfrmMain &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt;(TForm)
    Panel1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Panel2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPanel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button4&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Edit1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button5&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    PageControl1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TPageControl&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    ImageList1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TImageList&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button5Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button3Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button4Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;PageControl1Change&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;PageControl1DragDrop&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Source&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;PageControl1DragOver&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Source&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      State&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TDragState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; Accept&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Boolean&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;PageControl1MouseDown&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Button&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TMouseButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      Shift&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TShiftState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;private&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Private declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;public&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Public declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  frmMain&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TfrmMain&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  TbPg&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TTabSheet&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;implementation&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.dfm}&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; PageControl1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;PageCount&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Exit&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
PageControl1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ActivePage&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Free&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
TbPg&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;TTabSheet&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Create(PageControl1)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
TbPg&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;PageControl&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;PageControl1&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
TbPg&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ImageIndex&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
TbPg&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Tab &#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;IntToStr&lt;/span&gt;(PageControl1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;PageCount)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
PageControl1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ActivePage&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;TbPg&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
PageControl1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;TabWidth&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;150&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button3Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
memx&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TMemo&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; PageControl1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;PageCount&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Exit&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
memx&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;TMemo&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Create(PageControl1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ActivePage)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
memx&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Parent&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;PageControl1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ActivePage&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
memx&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Align&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;alClient&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
memx&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Lines&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Created in &#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;PageControl1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ActivePage&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button4Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
imgx&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TImage&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; PageControl1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;PageCount&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Exit&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
imgx&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;TImage&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Create(PageControl1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ActivePage)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
imgx&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Parent&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;PageControl1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ActivePage&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
imgx&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Align&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;alClient&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
imgx&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Proportional&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
imgx&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Picture&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;LoadFromFile(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;flower.jpg&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #888888;&quot;&gt;// picture prepared earlier in app folder&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button5Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; PageControl1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;PageCount&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Exit&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
PageControl1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ActivePage&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Edit1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;PageControl1Change&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
frmMain&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;PageControl1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ActivePage&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;PageControl1DragDrop&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Source&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;const&lt;/span&gt;
TCM_GETITEMRECT &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #005588; font-weight: bold;&quot;&gt;$130A&lt;/span&gt;  &lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
i&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
r&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TRect&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;//let&#39;s try to drag / move tabs&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;not&lt;/span&gt; ( Sender &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;is&lt;/span&gt; TPageControl ) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Exit&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;with&lt;/span&gt; PageControl1 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
   &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;to&lt;/span&gt; PageCount&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;

     Perform(TCM_GETITEMRECT&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;i&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;lParam(&lt;span style=&quot;color: #333333;&quot;&gt;@&lt;/span&gt;r)) &lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
     &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; PtInRect(r&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Point(X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Y)) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
     &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; i&lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt; ActivePage&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;PageIndex &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; ActivePage&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;PageIndex&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;i&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
     OnChange(&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Self&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
     &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Exit&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
     &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;PageControl1DragOver&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Source&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  State&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TDragState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; Accept&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Boolean&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; Sender &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;is&lt;/span&gt; TPageControl &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;  Accept&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;PageControl1MouseDown&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Button&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TMouseButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Shift&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TShiftState&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; X&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Y&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
PageControl1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;BeginDrag(&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
</description><link>https://xkobyx.blogspot.com/2016/12/delphi-tutorial-tabbed-interface.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxShNaoBxeN_a9HHCe4lURPz_GvjOOK5L97wIJsWoK6LVAeZd-2Di5ethA7JEDRQ9C9uxE_ljW9I8ApQYbrlZ5aIjdUaTyq_Ezvibzb-x2Lf8_UjiBSHNgxUZrxlTp9gkFjh4ODMdWhw0/s72-c/TabsMain.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-8529454708219518801</guid><pubDate>Fri, 02 Dec 2016 21:36:00 +0000</pubDate><atom:updated>2020-10-23T11:48:17.427-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Delphi</category><title>Delphi tutorial -  Use external fonts (Tip for 10 )</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgL1gQRdGEtnpjLco4p4UT27pdz7W1S6LXkaw4yuv3Fs-8acNiknF8b0gwfl5yApAMgc3WLklvDKtUb8o_OMpKe2cK2MMBFMLXlOB9dYI5lmZEOE4LuNZx0gzlntT3r6Y0DyZGtcRAh21I/s1600/MainImage.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgL1gQRdGEtnpjLco4p4UT27pdz7W1S6LXkaw4yuv3Fs-8acNiknF8b0gwfl5yApAMgc3WLklvDKtUb8o_OMpKe2cK2MMBFMLXlOB9dYI5lmZEOE4LuNZx0gzlntT3r6Y0DyZGtcRAh21I/s400/MainImage.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;script async=&quot;&quot; defer=&quot;&quot; src=&quot;https://apis.google.com/js/platform.js&quot;&gt;&lt;/script&gt;
  &lt;g:plusone&gt;&lt;/g:plusone&gt;

In this example I will show you how to use external fonts in your application, without installing font.&lt;br /&gt;
Following video shows details about creating this example, and below this video you can find source code for showed example.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; mytubeid=&quot;mytube1&quot; src=&quot;https://www.youtube.com/embed/-tVOMjcpxfE&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;(code style formatted by http://hilite.me/ )&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;unit&lt;/span&gt; MainForm&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;interface&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
  Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Messages&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Variants&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Graphics&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Dialogs&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ComCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; StdCtrls&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
  TForm2 &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt;(TForm)
    Label1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TListBox&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Edit1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Edit2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    UpDown1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TUpDown&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    FontDialog1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TFontDialog&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Edit2Change&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Edit1Change&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;UpDown1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Button&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TUDBtnType)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;ListBox1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCloseQuery&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; CanClose&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Boolean&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;private&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Private declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;public&lt;/span&gt;
   pthx&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;WideString&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  Form2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TForm2&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Strl&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TStringList&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;implementation&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;//this is procedure to get files in folder with filter just to search for ttf ( font)files&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;//and to put them in a stringlist&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;ListFileDir&lt;/span&gt;(Path&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; FileList&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TStrings)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  SR&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TSearchRec&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;FindFirst&lt;/span&gt;(Path &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;*.ttf&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; faAnyFile&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SR) &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;   &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;repeat&lt;/span&gt;
      &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (SR&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Attr &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt; faDirectory) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
        FileList&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(SR&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Name)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
      &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;until&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;FindNext&lt;/span&gt;(SR) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #007020;&quot;&gt;FindClose&lt;/span&gt;(SR)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.dfm}&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm2&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; FontDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Execute &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Label1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Font&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;FontDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Font&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm2&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Edit1Change&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Label1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Font&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Size&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;StrToInt&lt;/span&gt;(Edit1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm2&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Edit2Change&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Label1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Edit2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm2&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCloseQuery&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; CanClose&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Boolean&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; i&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
CanClose&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Screen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Cursor&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;crHourGlass&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;//we need to remove fonts from memory&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; I &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;to&lt;/span&gt; Strl&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Count&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
 RemoveFontResource(&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;PChar&lt;/span&gt;(pthx&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;Strl[i]))&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 SendMessage(HWND_BROADCAST&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;WM_FONTCHANGE&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Strl&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Free&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Screen&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Cursor&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;crDefault&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
CanClose&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm2&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormCreate&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; i&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
pthx&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;ExtractFilePath&lt;/span&gt;(Application&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExeName)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Strl&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;TStringList&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Create&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Strl&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Duplicates&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;dupIgnore&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;//get font files&lt;/span&gt;
ListFileDir(pthx&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;Strl)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; I &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;to&lt;/span&gt; Strl&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Count&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
 AddFontResource(&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;PChar&lt;/span&gt;(pthx&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;Strl[i]))&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 SendMessage(HWND_BROADCAST&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;WM_FONTCHANGE&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AddStrings(Strl)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm2&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;ListBox1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SelCount&lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;//this is a way to remove extension from file name , we put empty string&lt;/span&gt;
Label1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Font&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Name&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;ChangeFileExt&lt;/span&gt;(ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items[ListBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ItemIndex]&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm2&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;UpDown1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; Button&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TUDBtnType)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Edit1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;IntToStr&lt;/span&gt;(UpDown1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Position)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
</description><link>https://xkobyx.blogspot.com/2016/12/delphi-tutorial-use-external-fonts.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgL1gQRdGEtnpjLco4p4UT27pdz7W1S6LXkaw4yuv3Fs-8acNiknF8b0gwfl5yApAMgc3WLklvDKtUb8o_OMpKe2cK2MMBFMLXlOB9dYI5lmZEOE4LuNZx0gzlntT3r6Y0DyZGtcRAh21I/s72-c/MainImage.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-4584210534129465698</guid><pubDate>Mon, 14 Nov 2016 20:16:00 +0000</pubDate><atom:updated>2022-05-04T06:02:18.883-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">connect sqlite</category><category domain="http://www.blogger.com/atom/ns#">Delphi</category><category domain="http://www.blogger.com/atom/ns#">Delphi tutorial</category><category domain="http://www.blogger.com/atom/ns#">sqlite jdbc driver</category><category domain="http://www.blogger.com/atom/ns#">sqlite multiple connections</category><category domain="http://www.blogger.com/atom/ns#">sqlite odbc driver</category><category domain="http://www.blogger.com/atom/ns#">SQLite with ZEOS library</category><category domain="http://www.blogger.com/atom/ns#">sqlite3 connection</category><category domain="http://www.blogger.com/atom/ns#">sqliteconnection</category><title>Delphi tutorial  connect SQLite with ZEOS library</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6f5hj82uUgUhRTE3tbsY_J1XTGYcO9gwI0-0QmFDgt9pB00S4nFyk7FWEIupajwX3XuSd_j-Vywh0wrDk5uR4JY6_A1mdfUxdDKHHz3S3XAuoP_Rh1z6RjCngRR_1u7Tl5rov1XLf774/s1600/MainScreen.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;215&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6f5hj82uUgUhRTE3tbsY_J1XTGYcO9gwI0-0QmFDgt9pB00S4nFyk7FWEIupajwX3XuSd_j-Vywh0wrDk5uR4JY6_A1mdfUxdDKHHz3S3XAuoP_Rh1z6RjCngRR_1u7Tl5rov1XLf774/s400/MainScreen.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;

&lt;script async=&quot;&quot; src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1298149506906421&quot; data-ad-slot=&quot;5928500521&quot; style=&quot;display: inline-block; height: 60px; width: 568px;&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;

For this app to create you will need &quot;sqlite3.dll&quot; file which you can download from : https://sqlite.org/&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
Just save it in the same folder where your exe file will be, and link to it in you application like I explained in video tutorial.&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; mytubeid=&quot;mytube1&quot; src=&quot;https://www.youtube.com/embed/C8Oxq-jJ2ZY?vq=hd720&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
The third thing you need is installed ZeosDBO components for Delphi, from ZeosLib Development Group, and the lates source code you can find at http://www.sourceforge.net/projects/zeoslib&lt;br /&gt;
/*****************************************************************************/&lt;br /&gt;
Basically that are tools that you need.&lt;br /&gt;
We start with creating new project , adding necesary components on the form and writting code to achieve what we want.&lt;br /&gt;
In the video you can see all these steps, and in the code for showed example you can see details.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;(code style formatted by&amp;nbsp;http://hilite.me/ )&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script async=&quot;&quot; src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1298149506906421&quot; data-ad-slot=&quot;5928500521&quot; style=&quot;display: inline-block; height: 60px; width: 568px;&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;!--HTML generated using hilite.me--&gt;&lt;br /&gt;
&lt;div style=&quot;background: rgb(255, 255, 255); border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;unit&lt;/span&gt; MainForm&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;interface&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Messages&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Variants&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Graphics&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
Dialogs&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; StdCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Grids&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; DBGrids&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; DB&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ZAbstractRODataset&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ZAbstractDataset&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
ZDataset&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ZAbstractConnection&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ZConnection&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
TfrmMain &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt;(TForm)
ZConn&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TZConnection&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TZQuery&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TZQuery&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
DataSource1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TDataSource&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
DBGrid1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TDBGrid&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Button1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Button2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TComboBox&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Edit1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label4&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Edit2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Button3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label5&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Edit3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label6&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Edit4&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Button4&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Button5&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label7&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label8&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;ComboBox1Change&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button3Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button4Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button5Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;DBGrid1CellClick&lt;/span&gt;(Column&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TColumn)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;private&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;{ Private declarations }&lt;/span&gt;
&lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;public&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;{ Public declarations }&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
frmMain&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TfrmMain&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;implementation&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.dfm}&lt;/span&gt;


&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ZConn&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Protocol&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;sqlite-3&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZConn&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;LibraryLocation&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;ExtractFilePath&lt;/span&gt;(Application&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExeName)&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;sqlite3.dll&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;not&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;FileExists&lt;/span&gt;(ZConn&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;LibraryLocation) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Exit&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZConn&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Database&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;ExtractFilePath&lt;/span&gt;(Application&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExeName)&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;testdb.s3db&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;//if not FileExists(ZConn.Database) then Exit;&lt;/span&gt;
ZConn&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Connect&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;testdb.s3db&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZConn&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;GetTableNames(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ItemIndex&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;OnChange(&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Self&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Close&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;CREATE TABLE if not exists testtbl(id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,&#39;&lt;/span&gt;
&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;name VARCHAR(255),surname VARCHAR(255), UNIQUE(id))&#39;&lt;/span&gt;) &lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExecSQL&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZConn&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;GetTableNames(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ItemIndex&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;OnChange(&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Self&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button3Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; Edit1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;&#39;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Insert into testtbl(name,surname) values(&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;QuotedStr&lt;/span&gt;(Edit1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;,&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;QuotedStr&lt;/span&gt;(Edit2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;)&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExecSQL&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;OnChange(&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Self&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button4Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Update testtbl set name=&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;QuotedStr&lt;/span&gt;(Edit3&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;,surname=&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;QuotedStr&lt;/span&gt;(Edit4&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)
&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39; where id=&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;QuotedStr&lt;/span&gt;(Label8&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption))&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExecSQL&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;OnChange(&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Self&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button5Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ZQuery2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Delete&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;ComboBox1Change&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ZQuery2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Close&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Select * from &#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Open&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; I &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;to&lt;/span&gt; DBGrid1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Columns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Count&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
DBGrid1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Columns[i]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;DBGrid1CellClick&lt;/span&gt;(Column&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TColumn)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Edit3&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ZQuery2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FieldByName(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;name&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AsString&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Edit4&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ZQuery2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FieldByName(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;surname&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AsString&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
label8&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ZQuery2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FieldByName(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;id&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AsString&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;script async=&quot;&quot; src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1298149506906421&quot; data-ad-slot=&quot;5928500521&quot; style=&quot;display: inline-block; height: 60px; width: 568px;&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;
</description><link>https://xkobyx.blogspot.com/2016/11/delphi-tutorial-connect-sqlite-with.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6f5hj82uUgUhRTE3tbsY_J1XTGYcO9gwI0-0QmFDgt9pB00S4nFyk7FWEIupajwX3XuSd_j-Vywh0wrDk5uR4JY6_A1mdfUxdDKHHz3S3XAuoP_Rh1z6RjCngRR_1u7Tl5rov1XLf774/s72-c/MainScreen.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-2926787873861416622</guid><pubDate>Thu, 20 Oct 2016 18:11:00 +0000</pubDate><atom:updated>2020-10-23T11:48:17.451-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Delphi</category><title>Delphi tutorial – connect MySQL with ZEOS library</title><description>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8qPcMcNCC_iIwSA2MLWIm4VI2EMP1jfalE_1l4alEo-LbnTe7Eh2JxldnK4Bz_E9SdrbXQp99-9tfvBE04KoOROrymReUFIfKbLhjL6g6WZ71aIPFuva6uyET91vZ1D8b6-tPf-VmlPg/s1600/MainScreen.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;163&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8qPcMcNCC_iIwSA2MLWIm4VI2EMP1jfalE_1l4alEo-LbnTe7Eh2JxldnK4Bz_E9SdrbXQp99-9tfvBE04KoOROrymReUFIfKbLhjL6g6WZ71aIPFuva6uyET91vZ1D8b6-tPf-VmlPg/s400/MainScreen.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2&gt;
&amp;nbsp;&lt;/h2&gt;
&lt;h2&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;Delphi tutorial – connect MySQL with ZEOS library&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;360&quot; mytubeid=&quot;mytube7&quot; src=&quot;https://www.youtube.com/embed/_WFMYFz68RQ?vq=hd720&quot; width=&quot;480&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
After you manage to create this application, you will actually have small MySQL manager.&lt;br /&gt;
To achieve this you will have to have access to MySQL server.&lt;br /&gt;
In this tutorial I am using portable version of server called „USBWebserver“ which can be downloaded from : www.usbwebserver.net&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh34XV5NuDtQytI2JJ0QzUt4YNJzxXdbi3l7wXpyYNt9Ynu_jHObN-hIthp1SMO5AIxIRnMaG28JifjEOFd2xi8wNWbG3HZV-pycSlKzXs2njV83pSBWChHtNuSDx8xyPJp0-tn4n4-jYw/s1600/USBWS.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;192&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh34XV5NuDtQytI2JJ0QzUt4YNJzxXdbi3l7wXpyYNt9Ynu_jHObN-hIthp1SMO5AIxIRnMaG28JifjEOFd2xi8wNWbG3HZV-pycSlKzXs2njV83pSBWChHtNuSDx8xyPJp0-tn4n4-jYw/s400/USBWS.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Here you can see default port to Apache and MySQL server, and if you click on the button PHPMyadmin, &lt;br /&gt;
PHPMyAdmin will be opened in default web browser where you will see that default user for accessing PHPMyAdmin is „root“ and default password is „usbw“.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0dvwAjQutialcBZu4fOX2JBqRLbMnMBwH7ZpivifoJx_BvqAby2AnVafo_usYZz4MeKyxsrVPrDzEh2A8P4GsMppQiOzaTRfY350YF3gdVrMSCGucPr4fFAO7-gdabf0jOARtNS9ejJA/s1600/phpmyadmin.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0dvwAjQutialcBZu4fOX2JBqRLbMnMBwH7ZpivifoJx_BvqAby2AnVafo_usYZz4MeKyxsrVPrDzEh2A8P4GsMppQiOzaTRfY350YF3gdVrMSCGucPr4fFAO7-gdabf0jOARtNS9ejJA/s400/phpmyadmin.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example I used these data to access MySQL.&lt;br /&gt;
You also have option online with some free MySQL servers, just google something like „free mysql server „ or something like that.&lt;br /&gt;
Just pay attention on username , password and port number.&lt;br /&gt;
&lt;br /&gt;
/*****************************************************************************/&lt;br /&gt;
Second thing you need to have is „libmysql.dll“ file which is a part of the MySQL Connector, you can find one on official MySQL web page, or to download the one that I used in this example :&lt;br /&gt;
https://drive.google.com/open?id=0B_njK7HczCjDMGRVMGhGbUk1OHc&lt;br /&gt;
Just save it in the same folder where your exe file will be, and link to it in you application like I explained in video tutorial (ZConnection1.LibraryLocation:=ExtractFilePath(Application.ExeName)+&#39;libmysql.dll&#39;;)&lt;br /&gt;
/*****************************************************************************/&lt;br /&gt;
The third thing you need is installed ZeosDBO components for Delphi, from ZeosLib Development Group, and the lates source code you can find at http://www.sourceforge.net/projects/zeoslib&lt;br /&gt;
/*****************************************************************************/&lt;br /&gt;
Basically that are tools that you need.&lt;br /&gt;
We start with creating new project , adding necesary components on the form and writting code to achieve what we want.&lt;br /&gt;
In the video you can see all these steps, and in the code for showed example you can see details.&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;(code style formatted by http://hilite.me/ )&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;unit&lt;/span&gt; MainForm&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;interface&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
  Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Messages&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Variants&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Graphics&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  Dialogs&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; DB&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ZAbstractRODataset&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ZAbstractDataset&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ZDataset&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
  ZAbstractConnection&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ZConnection&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; ComCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; StdCtrls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Grids&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; DBGrids&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
  TfrmMain &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt;(TForm)
    GroupBox1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TGroupBox&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    txtHost&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    txtPort&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    txtUser&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label4&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    txtPass&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    StatusBar1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TStatusBar&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    ZConnection1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TZConnection&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TZQuery&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    GroupBox2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TGroupBox&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    GroupBox3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TGroupBox&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label5&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    txtDBName&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    cboDatabases&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TComboBox&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    cmdDelDB&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    cmdConnectDB&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    GroupBox4&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TGroupBox&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    cboTables&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TComboBox&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    cmdDelTable&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    cmdOpenTable&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label6&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button4&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    txtNewTable&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label7&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Label8&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    txtName&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    txtSurname&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button5&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    DBGrid1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TDBGrid&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    DataSource1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TDataSource&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;ZConnection1AfterConnect&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;ZConnection1AfterDisconnect&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button3Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdDelDBClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdConnectDBClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormClose&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; Action&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TCloseAction)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdOpenTableClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button4Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdDelTableClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button5Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;private&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Private declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;public&lt;/span&gt;
    &lt;span style=&quot;color: #888888;&quot;&gt;{ Public declarations }&lt;/span&gt;
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
  frmMain&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TfrmMain&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;implementation&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.dfm}&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; i&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;with&lt;/span&gt; ZConnection1 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  Disconnect&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Protocol&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;mysql&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  LibraryLocation&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;ExtractFilePath&lt;/span&gt;(Application&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExeName)&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;libmysql.dll&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  HostName&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;txtHost&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Port&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;StrToInt&lt;/span&gt;(txtPort&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  User&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;txtUser&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Password&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;txtPass&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  Connect&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
cboDatabases&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZConnection1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;GetCatalogNames(cboDatabases&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
cboDatabases&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ItemIndex&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ZConnection1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Disconnect&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button3Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Close&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;CREATE DATABASE &#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;txtDBName&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39; DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExecSQL&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Button1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Click&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
cboDatabases&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZConnection1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;GetCatalogNames(cboDatabases&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
cboDatabases&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ItemIndex&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button4Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Close&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;CREATE TABLE IF NOT EXISTS &#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;txtNewTable&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text
&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;(id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, Name VARCHAR(50), Surname VARCHAR(50),&#39;&lt;/span&gt;
&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;PRIMARY KEY(id) )DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExecSQL&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
cmdConnectDB&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Click&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button5Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; nmx&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;surnmx &lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
nmx&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;txtName&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
surnmx&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;txtSurname&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Close&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;INSERT INTO &#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;cboTables&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;(Name,Surname)&#39;&lt;/span&gt;
&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39; VALUES (&quot;&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;nmx&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;&quot;, &quot;&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;surnmx&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;&quot;)&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExecSQL&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
cmdOpenTable&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Click&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdConnectDBClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ZConnection1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Disconnect&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZConnection1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Database&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;cboDatabases&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZConnection1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Connect&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

cboTables&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZConnection1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;GetTableNames(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;cboTables&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
cboTables&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ItemIndex&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;


&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdDelDBClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; cboDatabases&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;&#39;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;   &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ZConnection1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Database&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Close&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Drop database &#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;cboDatabases&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExecSQL&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
    Button1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Click&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
cboDatabases&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ZConnection1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;GetCatalogNames(cboDatabases&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;items)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
cboDatabases&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ItemIndex&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdDelTableClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; cboTables&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;&#39;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Close&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Drop table &#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;cboTables&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
  ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExecSQL&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
cmdConnectDB&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Click&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;cmdOpenTableClick&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; i&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; cboTables&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;&#39;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
 ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Close&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Select * from &#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;cboTables&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 ZQuery1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Active&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
 &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; I &lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;to&lt;/span&gt; DBGrid1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Columns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Count&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;do&lt;/span&gt;
   &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
     DBGrid1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Columns[i]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
   &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;


&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;FormClose&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt; Action&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TCloseAction)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
ZConnection1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Disconnect&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;ZConnection1AfterConnect&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
StatusBar1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Panels[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Connected&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TfrmMain&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;ZConnection1AfterDisconnect&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
StatusBar1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Panels[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Disconnected&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;//end code&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
</description><link>https://xkobyx.blogspot.com/2016/10/delphi-tutorial-connect-mysql-with-zeos.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8qPcMcNCC_iIwSA2MLWIm4VI2EMP1jfalE_1l4alEo-LbnTe7Eh2JxldnK4Bz_E9SdrbXQp99-9tfvBE04KoOROrymReUFIfKbLhjL6g6WZ71aIPFuva6uyET91vZ1D8b6-tPf-VmlPg/s72-c/MainScreen.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-1000380497465740411</guid><pubDate>Sun, 25 Sep 2016 11:27:00 +0000</pubDate><atom:updated>2020-10-23T11:48:17.464-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Delphi</category><category domain="http://www.blogger.com/atom/ns#">DIY</category><title>Tutorial by Kobyx   Kitchen bar</title><description>Tutorial by Kobyx&amp;nbsp;&amp;nbsp; Kitchen bar&lt;br /&gt;
&lt;br /&gt;
Tutorial on creating kitchen bar by yourself.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; mytubeid=&quot;mytube1&quot; src=&quot;https://www.youtube.com/embed/yaXYDFY2vMg?vq=hd1080&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;</description><link>https://xkobyx.blogspot.com/2016/09/tutorial-by-kobyx-kitchen-bar.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/yaXYDFY2vMg/default.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4520949135332447736.post-6485636592762861292</guid><pubDate>Sat, 24 Sep 2016 11:04:00 +0000</pubDate><atom:updated>2020-10-23T11:48:17.475-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Delphi</category><title>Delphi tutorial   MS Access database with KADao</title><description>&lt;b&gt;Delphi tutorial   MS Access database with KADao&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This is Delphi Tutorial about creating and manipulating MS Access database&lt;br /&gt;
with KADAo component ( http://www.kadao.dir.bg/ ) ,&lt;br /&gt;
and as usual you can find here source code for this app, &lt;br /&gt;
and also exe files at address : https://drive.google.com/open?id=0B_njK7HczCjDWkdtbTVseExyYW8&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
Here is the video :&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;270&quot; src=&quot;https://www.youtube.com/embed/wiVcxkZZoCM&quot; width=&quot;480&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
Source code for this app example :&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;(code style formatted by http://hilite.me/ )&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;unit&lt;/span&gt; MainForm

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;interface&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;uses&lt;/span&gt;
Windows&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Messages&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; SysUtils&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Variants&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Classes&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Graphics&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Controls&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Forms&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
Dialogs&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; Grids&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; DBGrids&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; DB&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; KDaoTable&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; KDaoDataBase&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt; StdCtrls&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;type&lt;/span&gt;
TForm1 &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt;(TForm)
Button1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Button2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Button3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Button4&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
lbTblName&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TComboBox&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Edit1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label4&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Edit2&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Label5&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Edit3&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TEdit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Button5&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Button6&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Database1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TKADaoDatabase&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Table1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TKADaoTable&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
DataSource1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TDataSource&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
DBGrid1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TDBGrid&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Button7&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TButton&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
lbDbName&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TLabel&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TOpenDialog&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
SaveDialog1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TSaveDialog&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button3Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button4Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button6Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button5Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button7Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;private&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;{ Private declarations }&lt;/span&gt;
&lt;span style=&quot;color: #003388; font-weight: bold;&quot;&gt;public&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;{ Public declarations }&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
Form1&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; TForm1&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;implementation&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;{$R *.dfm}&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button1Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
SaveDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;InitialDir&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;ExtractFilePath&lt;/span&gt;(Application&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExeName) &lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; SaveDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Execute() &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;

Database1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Close&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Database1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;CreateAccessDatabase(SaveDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FileName&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;.mdb&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button2Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;var&lt;/span&gt;
TM&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;TKADaoTableManager&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; Database1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Connected&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Exit&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;try&lt;/span&gt;
Database1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Connected&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
TM&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;TKADaoTableManager&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Create(Database1)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
TM&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;TableName&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;InputBox(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Insert table name&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Table name&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Table 1&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
TM&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FieldDefs&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Field 1&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;ftInteger&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
TM&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FieldDefs&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Field 2&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;ftString&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
TM&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FieldDefs&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Field 3&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;ftDate&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
TM&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;IndexDefs&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Field 1&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Field 1&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;[ixPrimary&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;ixUnique])&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
TM&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;IndexDefs&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Add(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Field 2&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Field 2&#39;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;[])&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
TM&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;CreateTable&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
lbTblName&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;TM&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;TableName&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
TM&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Free&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

Database1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Connected&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Database1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Open&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AddStrings(Database1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;TableNames)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ItemIndex&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;


&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;except&lt;/span&gt;
ShowMessage(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Error creating table&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button3Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Execute() &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;InitialDir&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;ExtractFilePath&lt;/span&gt;(Application&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ExeName)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Database1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Close&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Database1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Database&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;OpenDialog1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FileName&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Database1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Open&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
lbDbName&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Caption&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Database1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Database&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Clear&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Items&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AddStrings(Database1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;TableNames)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;ItemIndex&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button4Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (Database1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Connected&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;and&lt;/span&gt; ( ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;&#39;&lt;/span&gt;) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Table1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Close&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Table1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;TableName&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;ComboBox1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Table1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Open&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

DBGrid1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Columns[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
DBGrid1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Columns[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;200&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
DBGrid1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Columns[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Width&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button5Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (Edit1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;&#39;&lt;/span&gt;) &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;

Table1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Insert&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Table1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Append&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Table1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FieldByName(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Field 1&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AsInteger&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;StrToInt&lt;/span&gt;(Edit1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Table1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FieldByName(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Field 2&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AsString&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;Edit2&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Table1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;FieldByName(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Field 3&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;AsDateTime&lt;span style=&quot;color: #333333;&quot;&gt;:=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;StrToDate&lt;/span&gt;(Edit3&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Text)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Table1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Post&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button6Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Table1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Edit&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Table1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;UpdateRecord&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
Table1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Post&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;TForm1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;Button7Click&lt;/span&gt;(Sender&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;TObject&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
Table1&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;Delete&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
</description><link>https://xkobyx.blogspot.com/2016/09/delphi-tutorial-ms-access-database-with.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/wiVcxkZZoCM/default.jpg" height="72" width="72"/><thr:total>0</thr:total></item></channel></rss>