In order to use this DLL, we have to compile it by pressingCtrl+F9. This should create a DLL calledSimpleMessageDLL.DLLin your projects folder. Finally, let's take a look at how to call the DllMessage procedure from a statically loaded DLL. To import a procedure contained in a DLL, ...
In short, the idea is to create, display, and destroy the "login" dialog before creating the main form. The Delphi MainForm When a new Delphi project is created, "Form1" automatically becomes the value of the MainForm property (of the global Application object). To assign a different...
It's much simpler to create a resource file that is identified by an ordinal (e.g.200) than it is to create one identified by a string (e.g.'MY_RESOURCE'), since the resource header records are a fixed size in the first case and are variable in the second case. We will only co...
We will use theTTimerto update the status bar with details of the active control every 1/10thof a second. To do this create aOnTimerevent handler for theTTimeras follows: 1procedureTForm1.Timer1Timer(Sender:TObject); 2begin 3ifAssigned(ActiveControl)then 4StatusBar1.SimpleText:='ActiveContr...
Note that the Application.CreateForm() procedure expects a variable of type TFormClass for its first parameter. If you can provide a TFormClass type variable (from a string), you will be able to create a form from its name. TheFindClass()Delphi function locates aclass type from a string....
To create a description of a particular object of Delphi-application (including application forms) you can also use the«Screen Capture»button. Picture 6. «Screen capture» window In the dialog box click the icon«Accessible-object»or«Win32-screen», and then go to the Delp...
Earlier we have learnedhow to create a Python Type using Python4Delphi componentsin a Delphi GUI app. From the post we know, how to create and use Python4Delphi components such as TPythonEngine, TPythonModule, TPythonType by a simple drag and drop in our application. But ...
1procedureWriteText(constTxt:string); 2var 3TS:TTextStream; 4begin 5// This opens stream on a file stream that will 6// be closed when this stream closes 7TS:=TTextStream.Create( 8TFileStream.Create('test.dat',fmCreate),True); ...
procedure TForm1.DBGrid1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin // in my test I only get here when clicked on empty part of the dbgrid FEmptySpace := TRUE; end; procedure TForm1.DBGrid1DblClick(Sender: TObject); ...
As is usual with COM, we have to create an object that implements an interface – IDropTarget in this case – and then tell Windows about it. Windows then calls the methods of our implementation of IDropTarget to notify us of drag drop events. If we accept a dropped object, Windows makes...