Delphi

59K

Solutions

17K

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

My Delphi application for Windows is packed in appx so I can have it published in Microsoft Store. At the first run, the app creates a folder in <user>AppData\Roaming to store there some files accessible for the users. Here's the code:

MyFolder:=GetSpecialFolderPath(CSIDL_APPDATA)+'\MyApp';
CreateDir(MyFolder);
TDirectory.SetAttributes(MyFolder,[TFileAttribute.faNormal]);

Open in new window


It works fine. When the app is running, the users can open its dialog windows, see this folder with all the files, read them or write into them. But only from the app! The mystery is that this new folder cannot be seen in Windows Explorer. Even in Command Prompt it seems non-existent!

Can anybody explain what this means?
0
Hi Guys,

The idFtp has an important event that gets the results, I don't know how to set / use the event when I create the idFtp in runtime. I need to
an example for it.  Below you can see my code and use it to give me an example.

Thanks a lot

  Function RunFTP( FtpServidor ,  FtpUsuario, FtpSenha, FtpPorta,  FtpAutentica, FtpCaminhoUpload, FtpCaminhoResposta: String): Boolean;

  Result := True

  if EstaVazio(FtpServidor) or EstaVazio( FtpUsuario ) or EstaVazio( FtpSenha ) or  EstaVazio( FtpAutentica ) or
     EstaVazio( FtpPorta )  {or EstaVazio( SmtpCaminhoUpload ) or EstaVazio( SmpCaminhoResposta )} then Begin
     ShowMessage('As configurações de FTP não estão completas no parceiro: ' + CodCad);
     Result := False;
     Exit;
  End;


  if FtpAutentica = '1' then
     FtpAut  := true
  else
     FtpAut  := false;


  IdFTP1 := TIdFTP.Create();
  IdFTP1.Disconnect;

  IdFTP1.Host     := FtpServidor;
  idFTP1.DirectoryListing.DirectoryName:= FtpCaminhoUpload;
  IdFTP1.Port     := Strtoint(FtpPorta);
  IdFTP1.Username := FtpUsuario;
  IdFTP1.Password := FtpSenha;
  IdFTP1.Passive  := FtpAut;

  try
     IdFTP1.Connect;
  except
     IdFTP1.Disconnect;
     IdFTP1.Connect;
     Result := False;
     Exit;
  end;

  BarraRotina('UP',Carquivo+iif(Tipo = 'Upload',' Envio ',' Recebimento ')+' de Arquivo '+Carquivo,0,0);

  Try
    Try
      if Tipo = 'Upload' then begin
         IdFTP1.Put (cArquivo, FtpCaminhoUpload+Carquivo, true);
      end else if Tipo = 

Open in new window

0
I want to programmatically have a form made visible in its normal size on the screen, when currently it is minimized (so just appears as an icon in the windows bar
0
The last versions of RAD Studio allow you to create appx packages for Microsoft Store. This is what I'm trying to do now with my Delphi project for Windows. There are some additional files which should be included in the package; during the installation, I want them to go to the default data folder like <user>\AppData\Roaming\MyApp, so that the users can easily access them.

In RAD Studio, additional files are specified in Deployment Manager. There's a parameter called Remote Path which determines the folder where the file will be put. The default is '.\' which is the installation folder. I don't want all my files to go there. But I couldn't find how you can specify the default data folder.
0
In my Delphi application, I determine the current directory by SysUtils.GetCurrentDir function. Of course, when the app is run, the current directory is the folder in which the installer put MyApp.exe file. By default, it is C:\Program Files\MyApp

Everything looks different now, after I packed my program in appx, in order to make a UWP application and submit it to Microsoft Store. Now the app goes to the folder C:\Program Files\WindowsApps\MyApp_1.0.0.0_x86__sp51hrchc9zqj.  However, the function GetCurrentDir returns a different address which is C:\WINDOWS\system32

What can I do about it? I need the address of the folder where the exe file is!
0
I´m running a miniature callcenter with business clients who use Microsoft Office 365 as their enterprise calendar system. The clients usually have anything from 10 to 200 employees using O365 calendars. I need to be able to get our callcenter program to tap into the client´s calendars and retreive information (free/busy is most important).

Some background info that may be useful: We run FreePBX (Asterisk) as our telephony platform. Our agents use an in-house developed program to handle the calls and get info about the clients. The program is fully customizable (developed in Delphi) and talks with a MySQL db where all the client info is stored.

When our callcenter agent gets a call to one of the client´s phone number, the client´s company info is displayed together with a complete listing of all the employees. We currently have no way of telling if the employee is free or busy, as we cannot access their calendar. I would need to get that information added to the employee info in our MySQL db. Perhaps synchronized once every 5 minutes.

How would you suggest me to go about this? I accept suggestions to 3rd party plugins (for example for Delphi). Freelance gig may also be accepted.

Thanks and sorry about my bad english.
0
Hi
Can you some one help me for following
i am using Quick Report 6  and Delphi Berlin 10.1

What i need
 generate report and send via e mail  

option  to be saved or send mail
0
I have several documents that are actually *.rtf files, but the extension was changed to *.doc.
Now I need to know if it is actually a *.rtf or a real *.doc file.

So I'm looking for a Delphi function that will determine if a document-file internally is ​a *.rtf of *.doc file.
The function should handle older version of word documents too (like Word 98).
0
When I try to Deploy/Run F9 my FireMonkey mobile app from a Win10.1x32 machine to an Ipad 4 mini, I get the following error:

paclient exited with code 1

When I change the build target to Android, everything works fine. I used Delphi Berlin and XCode 9.2 and it's my first iOS app.

Can anybody give me an advise?
0
I have a text file available and I want to place its entire content (including carriage-return/line feed) in the ClipBoard ...
0
Hi,

This question is related, to :
OS: Win 10
Prog Lang : Delphi 10.2
Type: OAuth 1 Request
Api: Flickr API
Method: flickr.photos.comments.addComment
Description: Add comment to a photo as the currently authenticated user.
Required Params (3):
  1. api_key (Mandatory): API application key.
  2. photo_id (Mandatory): The id of the photo to add a comment to.
  3. comment_text (Mandatory): Text of the comment
Help: https://www.flickr.com/services/api/


Infos
My application IS
  1. - fully functional,
  2. - authenticated,
  3. - authorized
  4. - and already uses similar functions requiring authentication.
May Application HAS
- Read and Write perms
Photo ID IS VALID
- 37003221603
   
Question:
How to add a COMMENT on a photo knowing its ID using the method "flickr.photos.comments.addComment" provided by the Flickr's Api ?
I've written the following function returning the request to send to Flickr in a similar way done for all functions that are working without problem.
But this one gives me an invalid result:

"oauth_problem=signature_invalid&debug_sbs=GET&https%3A%2F%2Fapi.flickr.com%2Fservices%2Frest&comment_text%3DWord%26format%3Drest%26method%3Dflickr.photos.comments.addComment%26oauth_consumer_key%3De18bf8e598480c5e03091a6a1c0b76c3%26oauth_nonce%3D3FD8DA177DB415864FF5B52B9982B120%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1521484643%26oauth_token%3D72157663363639987-7eb5726589a2beb0%26oauth_version%3D1.0%26photo_id%3D37003221603"
0
Hi can you help to write correct Query for Filter 3 Data fields

for Example
Data1 , Data2 , Data2

txt1 = Data1
txt2= data2
txt3 = data3

ex1: Data1  and Data 3
ex2: Data 3 and Data2
ex3: Data 1, Data 2 Data 3

Qury.Close;
Query.Sql.Clear;
Qury.Sql.Add (Select * From Table1);
If Not (txt1.text = ' ')then
   Begin
   Qury.Sql.Add(Format ('Where Data1= ' '%s' ' ',[txt1] ));
  end;
If not (txt3.text = ' ') then
   Begin
   Qury.Sql.Add(Format ('and Data3= ' '%s' ' ',[txt1] ));
  end;

lets say txt1 one is blank then how to write correct code ?
0
Hello,

I’m looking for a solution that allows me to convert *.doc or *.docx to *.pdf within Delphi DX10 Berlin / Tokyo Enterprise.
The solution should work even if MS Word isn’t installed on the users system.

Basically sending the Word-document to printer "Microsoft print to PDF" would do the trick for me. But all without any user interaction.


Thanks!
0
hi i have done following code to get data from table to String grid combo box and pass it to colums, but once i select data in first row its ok if i go to second row and select the items from combobox it does not show only shows first item which i select only, please check the attach images and code what i did please

procedure TfQuotation.StringGrid1GetEditorProp(Sender: TObject; ACol,
  ARow: Integer; AEditLink: TEditLink);
begin
with stringgrid1 do
    case acol of 0:
    begin
    ClearComboString;
    Combobox.Items.Add('HARDWARE');
    Combobox.Items.Add('SERVICE');
    end;
end;

end;
//================================================================
procedure TfQuotation.StringGrid1ComboDropDown(Sender: TObject; ARow,
  ACol: Integer);
begin
  with stringgrid1 do
      case acol of 2:
        begin
        ClearComboString;

        if (cells[0, arow] = 'HARDWARE') then
          begin
          QItem.Close;
          QItem.Open;
          QItem.First;
            repeat
            Combobox.Items.Add(QItem.FieldByName('Description').AsString);
            QItem.Next;
            until QItem.Eof;

          end;
        //======================================================================

        if (cells[0, arow] = 'SERVICE') then
          begin
          QService.Close;
          QService.Open;
          QService.First;
            repeat
            Combobox.Items.Add(QService.FieldByName('ServiceName').AsString);
0
Hi can you tell me how to add Combo box in to Adv String grid
Ex
i need to add Col 1 Combobox 1, Col2 need to add Combobox 2
0
Hi

following scenario:
- Delphi 10.1 Berlin
- SQL Server Database with a table "myTable", two columns "colA" and "colB"
- Open the table with SELECT colA, colB, colA * colB AS multiplyResult FROM myTable
- Form with a tDbGrid, showing all the columns

Know my question: I want to modify colA or colB (in the tDnGrid) and want that the result is displayed immediately. Is there a possibility to refresh only that calculated value without calling the refresh-method of the query (after the refresh I have to locate the row again and if it is a large table it is a performance-problem)?

Thanks for your hints, Peter
0
I am looking for an easy way to verify that the PC where my program is running is connected to the Internet.
The program is mine and coded in Delphi XE
Thanks
0
When I try the program below I get
error  "OLE error 800A03EC"
When I put the formula
=SOMMEN.ALS(R[-8]K:R[-2]K;R[-8]K[-1]:R[-2]K[-1];">100";R[-8]K[-1]:R[-2]K[-1];"<200")
manualy in the Excel sheet on cell (11,2) everyting is ok.
In the attachment the test.xlsx file.

===================

unit Unit1;

interface

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

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

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var ExcelApp : variant;
begin
  ExcelApp:= CreateOleObject('Excel.Application');
  ExcelApp.DisplayAlerts := False;
  ExcelApp.Workbooks.Open('c:\users\myself\temp\test.xlsx');
  //"=SOMMEN.ALS" is Dutch version of "=SUMIFS"
  ExcelApp.ActiveWorkbook.WorkSheets[1].Cells(11,2):='=SOMMEN.ALS(R[-8]K:R[-2]K;R[-8]K[-1]:R[-2]K[-1];">100";R[-8]K[-1]:R[-2]K[-1];"<200")';
  ExcelApp.Visible:=True;
end;

end.
test.xlsx
0
I need to get a Token from a WebSite.
I have attached a C# program, which I need to translate to Delphi.
OAuthFromWindowsApp.zip which you can download from here: ftp://compmark.biz/Authorization/OAuthFromWindowsApp.zip
I am playing around with it, but am not getting anywhere.

I haven't used Experts Exchange for a long time and I can't see, how to give points anymore.

I would like to allocate 1000 points for a solution if this is still valid. Or let me know if you want more.
I am very negotiable on this.
0
Hello,
I import data from table paradox to text file in timer wish the interval=one hour i want that my application run without form i put this instruction before Application.Run (Application.ShowMainForm := False) but i can't close the execution because i have not a form any solution please ,I m using Delphi 7(sorry for my bad english)
0
Hello,
I import data from table paradox to text file in timer wish the interval=one hour i want that my application run without form i put this instruction before Application.Run (Application.ShowMainForm := False) but i can't close the execution because i have not a form any solution please ,I m using Delphi 7(sorry for my bad english)
0
I want to have the background color of a particular TStringGrid cell to be for example Red when I write a string in that cell.
What is the instruction I have to place in the TStringGrid OnDrawCell event ?
0
Hi all,

I have Delphi XE7 and MSSQL 2008r2 . Have quiet a large table here (50.000 records) . I have a DateTime field in MSSQL.

I have a Adoquery in delphi with parameter. :mydate ftDatetime , NumericScale 3 , Precision 23 , Size 16 , Value Null (default , I've let Delphi populate ) .

Problem is I provide the query the datetime from DateTimePicker1 like this :

  if ViewQuery.Active then ViewQuery.Close;
  ViewQuery.Parameters.ParamByName('mydate').Value:=DateTimePicker1.Date;
  ViewQuery.Open;

Open in new window


TimeOut after 30 secs .

I solved it like this , changed the parameter :mydate to string , NumericScale 0 , Precision 0 , Size = -1 , Value Null .

  if ViewQuery.Active then ViewQuery.Close;
  ViewQuery.Parameters.ParamByName('mydate').Value:=inttostr(yearof(DateTimePicker1.Date))+'-'+inttostr(monthof(DatetimePicker1.Date))+'-'+inttostr(dayof(DateTimePicker1.Date));
  ViewQuery.Open;

Open in new window


I send the date to SQL exactly like it is stored internally . This is lightning fast .

Can someone explain to me , why is it not working as fast when I specify the parameter as ftDateTime?

Regards
Robert
0
Can I use Delphi 10.2.2  FireDac TFDLocalSql   with Firebird ?
0
I had this question after viewing Image On A TButton.

I have the same problem, but, I don't know why, few days ago it worked until I did something wrong in Project Option or somewhere, I presume,and then no chanche to see a TButton with an image inside in my app (only button). In a new app it works (Win10 Rad Delphi 10,2) May be the problem is in the attached file, but......
0

Delphi

59K

Solutions

17K

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.