Delphi

59K

Solutions

16K

Contributors

Delphi is the most powerful Object Pascal IDE and component library for cross-platform Native App Development with flexible Cloud services and broad IoT connectivity. It provides powerful VCL controls for Windows 10 and enables FMX development for Windows, Mac and Mobile. Delphi is your choice for ultrafast Enterprise Strong Development™. Look for increased memory for large projects, extended multi-monitor support, improved Object Inspector and much more. Delphi is 5x faster for development and deployment across multiple desktop, mobile, cloud and database platforms including 32-bit and 64-bit Windows 10.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hey everyone I have a problem with my query
Iwant to realise a query that at gives the maximum of the defects  in my database and displays the 3 top values in another table.

PS i developpe with delphi 7 and my database  with paradox 9.
help plz
0
Free Tool: SSL Checker
LVL 9
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Hi,

Some of my customers want to be able to mark the position on the human body where a person has pain and such.
Therefore I'm looking for a way to present some static images (from a whole body (front and back), or a part of it: like feet of hands).
To get a general idea you could visit: http://www.clinicjot.com/

Can anybody advise me on which Delphi components would be suitable for this? And how to get started?

Thanks.
0
Hello guys,

I create a simple dll and application that I only call a method and it display " hello world ".

Now I need to create a function where I can pass a string to it and do it display my message, take a look at my code:

Dll created

library DllCrystal;

uses
  SysUtils,
  Classes,
  Dialogs;

{$R *.res}

procedure DllMessage; export;
begin
  ShowMessage('Hello world from a Delphi DLL') ;
end;
 
 exports DllMessage;

begin
end.

Open in new window


My application that calls the DLL

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  procedure DllMessage; external 'DllCrystal.dll';

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  DllMessage
end;

end.

Open in new window



Now, I need a simple help from you how to do that, create a correct function and call the function in application passing the value to it.

thanks a lot
alex
0
I don't what happen, but not working old good SetForeground() ..


      wnd := FindWindow(nil, 'World of Warcraft');
      if wnd <> 0 then
        begin
          Memo1.Clear;
          Memo1.Lines.Add('World of Warcraft is loaded with handle : '+ inttostr(wnd));
          Form1.SendToBack; // Working
          BringWindowToTop(wnd); // not working
          SetForegroundWindow(wnd); // not working

Open in new window


Advice me, what need change ...
0
I am a Delphi Developer and I want to use  and ActiveX component (for Compression) in my application. Will this make my program more vulnerable to Virus attacks ? My program is a backup application that uses FTP and Sockets to transfer files and messages. My program has nothing to do with a Internet browser.
0
I am working on an application that has a toolbox (a small window that stays on top of, or even outside the main form).

There are three wishes to the visibility of this toolbox:
1) The user must be able to open and close (show and hide) the toolbox as s/he wishes. The toolbox can be opened AND closed via a menu item which uses the Checked flag to indicate the current state. The toolbox can also be closed via the X button of the toolbox itself.
2) When the user switches to a different application, the toolbox (if visible), must be hidden until the user switches back to the application in question. This is important because the user may have more instances of the application open and switching between them must also switch toolbox so that a visible toolbox is assured to be linked to the active application. The toolbox must only be shown again if it was visible before the application switch.
3) If the application is minimized, the toolbox (if visible), must be hidden until the application is restored. The toolbox must only be shown again if it was visible before the minimize.

Now, that's three wishes at the same time. Maybe I should have bought a Kinder Egg...

Opening and closing via a menu item is easy. I can simply ask for the current state of visibility, in order to determine whether to Show or to Hide. However, the nasty user can also close via the X button of the toolbox, so I cannot just set the menu item Checked property when processing the menu click. To …
0
Hello,

I use Delphi Seattle. I need to write an app for Android.
Please help me how to do the following task:

-the user makes photos with the phone
-in my app he needs to choose the photo(s)  (here it would be good that the directory of the camera would be the default)
-after choosing the photo(s) I need to copy it (them) to a NAS server folder.

On Windows this would be a 5 minutes task for me but I am a newbie with Android....

Thank you very much
0
Hello,

I have and Android multiplatform program written in Delphi Seattle.
I process a query like this (simplified version):
       While not MyQuery.Eof Do
        Begin
            MyProcedure(MyQuery.FieldByName('Field1').AsString );      
            MyQuery.Next;
        End;

Open in new window

This worked well, it processed every record.

Then I changed it to this:

       While not MyQuery.Eof Do
        Begin
            MyProcedure(MyQuery.FieldByName('Field1').AsString );     
            MyQuery2.Sql.Text := 'Insert into ....';
            MyQuery2.Execute;
            MyQuery.Next;
        End;

Open in new window


After this, only the first record was processed! The same code in Vcl (Windows) works perfectly.

Then I tried with a thread:

       While not MyQuery.Eof Do
        Begin
            MyProcedure(MyQuery.FieldByName('Field1').AsString );     
           MyQuery2.Sql.Text := 'Insert into ....';

           T := TTask.Run (
           procedure
            begin
              MyQuery2.Execute;
            end);

            MyQuery.Next;
        End;

Open in new window


After this, it processed again all the records but the MyQuery2 insert actually didn't happen.

Then I tried "MyMemo.Lines.Add( 'xxx'); instead of MyQuery2 and again it processed the first record only:
       While not MyQuery.Eof Do
        Begin
            MyProcedure(MyQuery.FieldByName('Field1').AsString );      
            MyMemo.Lines.Add( 'xxx');
            MyQuery.Next;
        End;

Open in new window


What is weird for me that it seems to me that sometimes Android doesn't process the commands sequentially.
What can I do? Is there a "rule book" when Android decides when not to "take care" of my next command line?

Thank you very much.
0
I am using Embarcadero C++ builder XE10.1 Berlin in an FMX application. How do I set the background colour in a TEdit control ?
0
I have a C++ builder code snippet below which I wish to use to display the cell values in a FMX TGrid component
The code gets called but the cell content is not displayed.
I suspect that this may be due to the TFillTextFlags not being initialised ? how do I do this or otherwise get the code to work ?
Also, how would I set the colour of the text being displayed by the fillText function ?

Thanks,

Roger

void __fastcall TForm1::Grid1DrawColumnCell(TObject *Sender, TCanvas * const Canvas,
		  TColumn * const Column, const TRectF &Bounds, const int Row,
		  const TValue &Value, const TGridDrawStates State)
{
	TValue v = Value;
	UnicodeString u = v.AsString();
	TFillTextFlags flags;
	Fmx::Types::TTextAlign ATextAlign;

	Canvas->Clear(claWhite);
	Canvas->FillText(Bounds,u,false,1,flags,Fmx::Types::TTextAlign(0x0));
}

Open in new window

0
[Live Webinar] The Cloud Skills Gap
LVL 4
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

I have an XML file (see Attached file)  with a pdf file attached to it, which can be found at the following path

'Invoice/cac:AdditionalDocumentReference/cac:Attachment/cbc:EmbeddedDocumentBinaryObject'

I tried decoding the mimeCode (assuming this was decoded with base64?) and then tried to save it to a pdf file using a TStringStream... but it just gives me an empty pdf file.

ss := TStringStream.Create;
str := IdDecoderMIME1.DecodeString( str );
ss.WriteString( str );
ss.Position := 0;
ss.SaveToFile('C:\pdf.pdf');

Open in new window



How can I extract the pdf file from the xml and save it to a file?
XML-with-pdf-attached.xml
0
I currently have a program that downloads a file from my VPS and extracts it. I want to make it download straight from the original website but it doesn't want to work. I want to make it download this link: https://bintray.com/oxidemod/builds/download_file?file_path=Oxide-Rust.zip instead of this: http://41.185.91.51/RSM/Oxide-Rust.zip

I'm using Rad Studio 10.2

I did find this post but I'm struggling to add it to my current project: https://www.experts-exchange.com/questions/23286908/Downloaded-files-using-TIdHTTP-INDY-10.html

Here is my current project code:
unit uOxideModInstaller;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
  System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, Vcl.ComCtrls,
  Vcl.StdCtrls, IdBaseComponent, IdComponent,
  IdTCPConnection, IdTCPClient, IdHTTP, System.Zip;

type

  TDownload = class;

  Tfrmoxidemodinstaller = class(TForm)
    lbl1: TLabel;
    pb1: TProgressBar;
    btn1: TButton;
    btn2: TButton;
    lblstatus: TLabel;
    procedure btn2Click(Sender: TObject);
    procedure btn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

  TDownload = class(TThread)
  private
    httpclient: TIdHTTP;
    url: string;
    filename: string;
    maxprogressbar: integer;
    progressbarstatus: integer;
    procedure ExtractZip(ZipFile: string; ExtractPath: string);
    procedure idhttp1Work(ASender: TObject;

Open in new window

0
The result I wantI would like to make a graph with stacked bars in fact I have a table with Type,duree and Attente for each Type (F, M, P, ...) and I want to display them as a histogramm double i used ChartFX And TDBChart but I do not get the desired result please help me I m using Delphi 7 and i use this code to calculate Duree and Attente
DataModule1.Chart1.first;
   while not DataModule1.Chart1.EOF do
   begin
   DataModule1.Chart1.delete;
   end;
Req:= 'Select Type,Sum(Duree) as Duree,Sum(Attente1) as Attente1'
+' From "Ouvraison.DB"'
+' Group by Type'
+' Order by Type';
with DataModule1 do
begin
Query1.close;
Query1.SQL.Clear;
Query1.SQL.Add(Req);
Query1.Open;
Query1.first;
   while not Query1.eof do
   begin
   DataModule1.Chart1.Insert;
   DataModule1.Chart1.FieldByName('Type').value                             :=Query1.FieldByName('Type').value;
   DataModule1.Chart1.FieldByName('Duree').value                            :=Query1.FieldByName('Duree').value;
   DataModule1.Chart1.FieldByName('Attente').value                          :=Query1.FieldByName('Attente1').value;
   DataModule1.Chart1.post;
   Query1.next;
   end;
0
I add data from Query to Memo .
for example
1    3    555    66    7    77    11    
2    0    0    0    0    1    1
1    11    22    11    1    33    1

How can I align text like this ?


1    3    555    66    7    77    11    1
2    0        0      0     0      1      1
1  11      22    11    1    33      1

I Use
 Memo1.lines.add(Query.field[0].value+'  '+Query.field[1].valu+'  '+Query.field[2].value......);
0
Hello,

I need a timer which does something exactly at specified times , 10 minutes starting from each hour
e.g. 10:00, 10:10, 10:20 ... 10:50, 11:00,11:10 etc.

So if the user starts my program between 9:51 and 10:00  the first timer tick should be at 10:00, if he starts my program between 10:01 and 10:10  the first timer tick should be at 10:10 etc. -> and then set the next tick to the next 10 minutes.

How can I do this? Thank you.
1
Hello,

I got a Delphi project which was not written by me.
A form contains hundreds of visual components, tabs etc.

I need to delete a certain tDbText component. I can find it in Object Inspector and also in Structure, however it is not highlighted on the form (it is visible).

How can I delete it? ( it is in Delphi 2010).

Thank you.
0
What I'm trying to do is have TIMAGE where the TOP portion (xxx pixels) and LEFT portion (xxx pixels) are locked in place when the user scrolls through the remaining portion of the image .

Think of an Excel spreadsheet where the top row and first column are locked in place. Trying to recreate that with a TImage.
0
I have the code:

For iLoop := 0 TO ComponentCount - 1
  Do
    Begin
      If Components[iLoop] is TComponent
        Then
          Begin
            TButton(Components[iLoop]).Cursor := crHourGlass;
End;
End;

That's in a much larger code obviously and I've figured out that that is the code causing my problem because when I remove it then I get no errors.  
I've recently added a TPopupMenu and whenever that code gets called up I get an access violation and the application crashes, I'm not sure if it is the TPopupMenu that is making a difference but please help, is there any way I can stop it from giving me the access violation?

Thanks.
Claudio
0
Hello,

I have Delphi Seattle.

Scenario:
- I press F1 to invoke the Help, It shows up
- I switch back to Delphi
 -I switch back to the Help -> It will never show again, no matter if I click on the tray or use Control-Tab

The ONLY way to see the help again is to hide Delphi. This is frustrating because I can't see both even if I have two monitors.

Is there a workaround? (with Delphi 2010 it works well).

Thank you.
0
Free Tool: Path Explorer
LVL 9
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

ICapture want to color by alternating a group of line DBGRID according to the reference (RefBac) if the reference changes the color change (blue / white / blue / white ...) is it possible ? if it's possible how can i do this ? or it is what it is Possible to separate the groups of rows with each change by a bold line? you find a capture of the result that I want to have
Capture.PNG
0
User have to choose one from two radiobutton. When they havent choose ,how to show a warning box (mesaage box), is it possible?
0
I am using Delphi Berlin and QR6, when I preview my report, on the preview window left corner I see a "page 1 of 10", "page 2 of 10" expression. How can I use de "of 10" part on my report? In the new quick report that is done without the ".prepare" option, which causes delay on showing the report
0
i wanna limit the checkbox selection.. from two checkbox i will only let they choose one,and the other which is not selected become grey
0
example

I have two checkboxes and one combobox.
If in the combobox written 'house' and both checkboxes are checked then a warning message box will appear,
0
Hi,

I wanted to use 7Zip from my Delphi application. Through the official link I get the *.7Z format only.
I am looking for the Zip format with Deflate64 method.

Regards
Allan
0

Delphi

59K

Solutions

16K

Contributors

Delphi is the most powerful Object Pascal IDE and component library for cross-platform Native App Development with flexible Cloud services and broad IoT connectivity. It provides powerful VCL controls for Windows 10 and enables FMX development for Windows, Mac and Mobile. Delphi is your choice for ultrafast Enterprise Strong Development™. Look for increased memory for large projects, extended multi-monitor support, improved Object Inspector and much more. Delphi is 5x faster for development and deployment across multiple desktop, mobile, cloud and database platforms including 32-bit and 64-bit Windows 10.