Jump to content

JDS2018

Members
  • Content Count

    20
  • Joined

  • Last visited

Posts posted by JDS2018


  1. 3 hours ago, vfbb said:

    Try this: I have try not working 😞

    
    uses
      System.SysUtils, System.IOUtils, Winapi.Windows, Winapi.ShellAPI;
    
    procedure OpenPdf(const AFileName: string);
    var
      LURL: string;
    begin
      LURL := TPath.GetFullPath(AFileName).Replace('\', '/', [rfReplaceAll]);
      LURL := 'file://' + LURL;
      ShellExecute(0, 'open', PChar(LURL), nil, nil, SW_SHOWNORMAL);
    end;

     

     


  2. Nothing Happen,it wont open.

     i am not have that Experience with coding  i am just beginner, 

     

    what is the best way to Open Pdf file when i give File Path ?

     

    Can you help me please i am using Delphi 10.2

     


  3. Var

    application, appParams, fileName,
      shellParams: string;

     

    How to open PDF File in Delphi  using ShellExecute

     

    application := 'AcroRd32.exe';
      appParams:= '/A "zoom=100=OpenActions"';
      fileName := 'C:\test.pdf';
      shellParams := Format('%s "%s"', [appParams, fileName]);

      ShellExecute(Handle, nil, PChar(application), PChar(shellParams), nil, SW_SHOW);

     

    this not working, pdf open and says file cannot to be open,

    but if i open manfully its open no issue


  4. Hi

    Can Someone help me on below

     

    i need to make app count down for 1 Year

     

    Let Say if i set Date for  2021 Dec 31

     

    need to see  to the Set Date

    How Many Year , months , Days , Hours , Mints, Seconds Left

     

     

     

     


  5. Hi

    i am trying to use Genosite PDFTool  gtPDFEngine component, once i use this i am getting following error

     

    [dcc32 Fatal Error] Unit1.pas(7): F2613 Unit 'gtClasses3' not found.

     

    i have install correctly and given the path to library ok

     

    i am using Delphi 10.3.3

     

    any one can help  me on this

     

     

     


  6. Hi can you some one help me on below

     

    i have edit1, edit2 edit3, edit4

     

    i need to add add  text from edit boxs to string grid when i click add Button , i am using multi device Windows application for Windows , on Delphi 10.3 



  7. i am using Delphi 10.3.3, and i develop app for Android with local language fonts (Sinhala Sri Lankan Language), 
    same font i can see in my mobile no issue, but when use the same font for my app fonts shows weird, for your reference 
    i am attaching 2 screenshot with the app and same text with my mail phone and the fonts i use. and i already add to the deployment, 
    and given the path .\assets\internal  as well still the problem same, if you can help me i relay appreciate, since i am not 
    professional developer still i am just learner,

    Noto Sans Sinhala.ttf

    Screenshot_20200824-204008_Gmail.jpg

    Screenshot_20200824-204056.jpg


  8. Hi i am using Delphi 10.3.3 and i am trying to Use Local Fonts (Sinhalese Fonts (Sri Lankan)), in Design mood in PC Its shows perfect, when i run in android phone Fonts not display in proper, same fonts i can see properly in in Whatsup without any issue is there any way how to fix this fonts issue ?


  9. Hi 

    i am using MS Access Database With Delphi RAD Studio 10.1 and i am trying to Delete All the Records Between 2 Days with following SQL

     

      StartDate:= '';
      EndDate:= '';
      StartDate:=FormatDateTime('m/d/yyyy',DStartDate.Date);
      EndDate:=FormatDateTime('m/d/yyyy',DEndDate.Date);

     

    Query.SQL.Add('Delete * From Ledger');

    Query.SQL.Add('Where  LedgerDate between '''+ StartDate +''' And'''+ EndDate+'');

     

    but when i run i am getting error please check the attach image

     

    if any one can tell me what is the issue , relay appreciate. thanks

    error.PNG


  10. Hi

     

    i have done following code

     

    procedure TForm1.btnCalculateClick(Sender: TObject);
    var
      span: TTimeSpan;
      AYear,AMonth,ADay:Word;
      BYear,BMonth,BDay:Word;
      AHour,AMinit,ASec,AMSec:Word;
      BHour,BMinit,BSec,BMSec:Word;


    begin
      DecodeDate(DDate.Date,AYear,AMonth,ADay);
      DecodeTime(DTime.Time, AHour, AMinit, ASec, AMSec);

      DecodeDate(DDate2.Date,BYear,BMonth,BDay);
      DecodeTime(DTime2.Time, bHour, BMinit, BSec, BMSec);

      span := TTimeSpan.Subtract(EncodeDate(AYear,AMonth,ADay)+ EncodeTime(AHour,AMinit,ASec,AMSec),
               EncodeDate(BYear,BMonth,BDay)+ EncodeTime(BHour,BMinit,BSec, BMSec));
      Writeln(Format('%d Day(s) %d Hour(s) %d Minute(s)', [span.Days, span.Hours, span.Minutes]));
      Readln;
      ShowMessage(IntToStr(span.Days));
    end;

     

    But i am getting  I/O error 105


  11. Hi Thanks for the quick Reply

     

    as per you code i have done following

     

    i have add 4 DateTimePicker, 1 Label

     

    As below

     

    DDate1.Date  = Select Date

    DTime1.Time = Select Time

     

    DDate2.Date = Select Date

    DTime2.Time = Select Time

     

    above that how can i add it to your code ? and show the result in to label

    and i am sorry i am not profeesionl for Delphi i am just learning things still.

     

    If Use Code Like this 

    span := TTimeSpan.Subtract(EncodeDate(DDate1.Dat)+EncodeTime(DTime1.Time), EncodeDate(DDate2.Date)+EncodeTime(DTime2.Time));

    i am getting following error while i am complying

    [dcc32 Error] Unit1.pas(67): E2003 Undeclared identifier: 'DDate1'

     

     

    Can you help me please

     

     

     

×