Tag: delphi
-
How to add a server application written in UNIGUI to startup?
This post is not about programming, but rather about Deploy applications and a little about administration. The easiest way to host a UniGUI application on the StandAlone server is to simply drop the EXE file onto the server machine. Our EXE itself is a server program, so on the server machine we just need to run ... -
UniGUI Expiry Link Anonymizer
Let’s write a simple UniGUI link anonymizer with a limited link expiration date. First, let’s make a simple option – relying on the API of a third-party service. Our task is only to attach a time limit to such a link. Naturally, if we use a third-party service, then smart people will simply copy the anonymized link after ... -
UniGUI Add CAPTCHA to the WEB project
The example is taken from the UniGUI forum and slightly modified. Here’s what we get in the end Usage example. We can customize the number of digits, the number of stripes, angles, colors and so on. See the code. unit Main; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ... -
UniGui. Unique hybrid of Delphi and JS
Today I stumbled upon an interesting feature in UniGui – to handle component events using JavaScript, and specifically using functions from the ExtJS library. Let’s look at a simple example. Let’s open the UniGui project in Delphi and add 2 UniButton1 and UniEdit1 elements to the form Now, in the object inspector, find ExtEvents Next, ... -
How to extract text between HTML or XML tags?
There are certain types of data that we want to collect from HTML or XML, for handling them, or better display. There are ways to do this with TWebBrowser, but it forces us to have to load the file in it and the manipulation is not very easy. But let’s say we have HTML or ... -
Internationalizing your application in Delphi
If you want your Delphi application to be ready to handle multiple locations, then you need to internationalize it. There are three common aspects that must be addressed: * Features * Unit conversions * Dynamic messages We will cover the three with an example very simply. Consider the following code cut out for the locality ... -
How to select a printer installed in Windows?
In system configurations it is very common to have to inform a standard printer to automate some task. Right. We can manually enter the printer share name or we can create a way for the user to choose easily. Using TPrinterDialog, the system will make use of Windows’ own search! Let’s go to the code! I ... -
How to select multiple files with OpenDialog?
Hello guys! I was having the need to select multiple files with OpenDialog. After some tests I managed to solve this problem and decided to post how to do it. Step 1 is to go inside OpenDialog’s Options property, in the option ofAllowMultiSelect and place it with True. Below is an image to help understanding. 2nd step ... -
How to automatically adjust the size of DBGrid columns?
Problem: How to occupy all the available space in the DBGrid? Often, when we maximize a screen, there is a blank space if useful, other times we don’t want the Grid to be scrolled. Therefore, it is necessary a way to automatically size the columns. Fortunately, there is a solution that is easy to implement! ... -
Showing “wait” screen for time-consuming processes
A good practice in systems development is to let the user know what is being processed, thus avoiding the appearance that the program is stuck. Researching about it I found in a post with a simple alternative. unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, Vcl.StdCtrls; ...