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

Hi Experts;

I have a Form with a TImage containing a JPEG that has TLabels with captions and text in TEdits on top of the image. I'm assuming if I save the image's canvas by defining its TRect  I can save the image with the label captions and edit text in the image file. Something like a screen shot of just the Timage control. Timage.SaveToFile saves only the JPEG image not the captions and text on top. I am using Delphi 7.

Thank you for the help,
Visionet
0
Free Tool: Site Down Detector
LVL 9
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Greetings!
in my betting software project i have 2 tables and a query like this:

procedure TMain.Button16Click(Sender: TObject);
begin

ADOTABLE2.first;
while NOT ADOTABLE2.EOF do BEGIN
ADOQuery8.Close;
ADOQuery8.SQL.Clear;
ADOQuery8.SQL.Add ('SELECT SUM(W1) as total1, SUM(B1) as total2, COUNT(*) AS TOT');
ADOQuery8.SQL.Add ('FROM Table1');
ADOQuery8.SQL.Add ('WHERE League = '+QUOTEDSTR(adotable2.FieldByName('League').asstring));
ADOQuery8.Open;

It works very well, but i need to get only the first 30 records from table1 and not the whole records.
The table also has a date field called 'data', i made many tests but with no success...
It is a delphi app (embarcadero xe8) with ado components and ms access tables.

Thanks!
Luigi
0
Hello, I hope you are well
So I try to  Sort the column PSCOK  by descending order , i tried order by but it doesn't give the result that i hope, i tried also Reference fields but it doesn't work , i m using paradox,TTABLE,TQUERY,any other solution please ? Thaaaanks                  Delphi 7The Table that i wish it be sorted
0
Is there a component in Delphi for viewing PDF files in your application?
I would like to use a free component, that can work without the need to install certain programs on every pc that would use our program ( like Adobe Reader).
0
Hello,
Can someone help me in this solution:
1.I have request for file in VPN with type: ''http://192.168.1.35/getlog.csv?id=0&start=2016-07-08T21:45:00&stop=2017-08-03T21:45:00''
2.I'm trying to use WebBrowser at first but I just give message for save or cancel - but I want directly to save downloaded file on HDD of computer.
3.I'm also try to use  WinInet unit, but also without success.

Can someone help me with this solution? Are someone know how to make this - to save directly file on HDD without screen for save?
Thanks for help.

My email is: rado@rocketmail.com
0
In a nut shell, plan to have a TSpeedButton,  by the same name on ten forms.
Whenever the button is clicked on any form, want to change the image and caption,
on all forms.
Something like this;

procedure TForm1.Button1Click(Sender: TObject);
var
  i, f: integer;
  s: string;

begin

  with Application do begin

    for i := 0 to ComponentCount -1 do begin

      if Components[i].ClassName = 'TForm' then begin // or Application.Components[i].ClassType = TForm

        for f := 0 to Formx.ComponentCount -1 do begin

          if Formx.Components[i].ClassName = 'TSpeedButton' then begin

            if TSpeedButton.Name = 'SomethingSpecial' then

              Call another procedure with form and button info
              Set to caption and image


          end;
        end;
      end;
    end;
  end;
end;
0
I have written an Android app in Delphi.

I attached two pictures so as to see the problem.
The app starts with login:
-first the user click in login name field then writes in the login name
-then he clicks in the password field and writes in the password

On big screens, this is not an issue because both the keyboard and the two fields can be seen.

But on small screens the keyboard window gets over the fields and the keyboard window cannot be hidden!

Just to clarify the upper "empty" grey section, in reality, is not empty I only didn't want to show the contents here (therefore I can't move the login boxes to that area).

Thank you in advance for your help!
SS-Login1.png
SS-Login2.png
0
i want to handle any exception that raised inside my application without showing any error box to the user so if exception happened  just Continue is this is possible ?
0
How To Create Ms database and assin PassWord   to database and copy table by using (Select * From .....)  in Delphi
0
Here is a scenario.

I have to forms. Form 1 and form 2. Form 1 is linked to form 2 in the uses clause of form 1. Now i have the ability to use an onlick event of a button on form 1 to show/hide form 2. How do i use the onlick event of a button on form 2 to show/hide form 1?

Its not only this that i want to be doing. I want to be able to access data across two forms that linked.
0
What does it mean to be "Always On"?
LVL 4
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Hello,

I have an app which I wrote in Delphi Seattle.

The user can change the language from the app, but I want to change the language automatically when somebody first starts the app.
E.g. if the language of the phone is English then it would switch to English, if the language of the phone is German then it would switch to German etc.

For this, I need to know at program start the language of the phone. How can I get this info?

Thank you
0
I have a main form and a frame. I have dynamically placed the frame on the form and set the parent of the frame to be the panel on the form.

When i try to free the frame via a button on the frame, using self.free, i get an access violation error thereafter.

I am a beginner programmer and i would like to know how to free the frame from memory without getting an access violation error.
0
I have many kind of components on the form and I need to change the captions:

    While not Eof Do
     Begin

       MyComponent := InputRek.InputForm.FindComponent(FieldByName('Name').AsString);

       If MyComponent<>nil Then
        Begin

          If MyComponent is TButton Then
           Begin
            ( MyComponent as TButton).Text := FieldByName('Value').AsString;
           End

          Else If MyComponent is TTabItem Then
           Begin
            ( MyComponent as TTabItem).Text := FieldByName('Value').AsString;
           End;

// and here a lot of others
        End;

       Next;
     End;

Is there any way to use only one row instead of many If-s?
E.g. MyComponent.Text  ... I know that this is not possible but maybe there is a common ancestor which has Text property...

Thank you
Delphi
0
I have a menu item with a ShortCut inside a popup menu. I need to detect whether this menu item has been either manually clicked (e.g. with the mouse) or with the shortcut. Is this possible?
0
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
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 am writing a REST client application using Embarcadero C++ builder Xe10.1 Berlin.
I need to have the REST server IP address configurable.
I have initially set the TRESTClient component BaseURL property to a known server IP address in the IDE. The BaseURL property value is http://10.41.9.27:8080 and the application works just fine.
If I add code to change the BaseURL property however, the application doesn't respond and times out ?
Even if I use the value that works when set in the IDE, after the following code is run the application stops working ?

RESTClient1->BaseURL = u"http://10.41.9.27:8080";

Open in new window


Any ideas please ?
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
Technology Partners: We Want Your Opinion!
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

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.