Go Premium for a chance to win a PS4. Enter to Win

x

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

I need the source-code for a MINIMAL-SIZE empty RTF file.

So I opened Microsoft WordPad and saved the empty text to an RTF file which gave me this result:

{\rtf1\ansi\ansicpg1252\deff0\deflang3079{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang7\f0\fs22\par
}

Open in new window


But I suspect that there is still unnecessary information in this source-code.

I also suspect that the code "\rtf1\ansi\ansicpg1252" could lead to incompatibilities with some languages?

Also, the generator information seems superfluous to me.

So what is the smallest possible and most compatible source code for an empty RTF file?

[Unfortunately, there is no approved RTF topic to chose.]
0
i have a node with drawing image on the right corner i wanted to make an on click event to that drawed image can i do that ?
0
Here is a solution to this problem - dated 2010.

https://www.experts-exchange.com/questions/25015022/Execute-Dos-app-from-delphi.html

I tried the functions ExecProcess and ExecWaitProcess - but they seem to no longer work under Delphi XE8

Here is my code:

var
  s1: string;
begin
  Screen.Cursor := crHourGlass;
  s1 := 'dir c:\*.* ';
//  ExecProcess(s1, True);
  ExecWaitProcess(s1, True);

  Memo1.Lines.Add(s1);
  Screen.Cursor := crDefault;
end;

Open in new window


Either they fail, or they complete instantly. Any better solutions?
0
Hello guys,

I have a TEdit and on event Onchange I created a function for format in real time my currency but I get erro:  'R$ 1,00' is not a valid floating point value.



procedure TF_produtos.Edit4Change(Sender: TObject);

 var Resultado: Real;
begin

      Resultado:= StrToFloat(Edit4.Text);
      Edit4.Text:= FormatFloat('R$ ###,###,##0.00',Resultado);

end;

Open in new window

0
Hello,
I ask you to help me on this subject.
I want to make an application with delphi 10.2 tokyo, which can create and read and write in an excel 2003 and 2007 file, without ole and without the ms excel set installs in the pc.
Is what can be done with teen, what are the commands and procedure
And is that there is another method
thank you
0
I have two forms in the application: both the Main form and the other 2nd form are fsNormal.
Because the Main form covers the whole screen and the other is smaller if the user clicks next to 2nd form it goes in the background.

I don't want to use ShowModal, but I would like to show the second form on the windows taskbar too.
Is there a way to do this?

Thank you very much.
0
Can someone point me in the direction of sending out via email a meeting request from a Delphi program (typically Delphi XE5), I have tied some code emailing an .vcs file and also an .ics file however neither one when the email is opened in outlook offers the Accept/Decline options.

Any guidance and further advice on the best way of doing this would be most welcome.
0
I just brought a Delphi and it wont connect to my computer. It keeps saying that there was no vci found. How do I connect this to my computer to be able to start using it. When this was purchased I was given no instructions.

Any Ideas??
0
procedure TfrmAdd.BitBtn2Click(Sender: TObject);
var
  sUserSurname , SUserDOB , sUserID , sUserName , sPassword , sAccessType
 ,sNotes , sEmail , sAllergies , sOccupation , sStaffName , sContact1 , sContact2 , sEmergencyContact : string ;
 iContact1 , iContact2 , iEmergencyContact : integer ;
begin

  sUserName := edtUserName.Text ;
  sUserSurname := edtUserSurname.Text ;
  sUserId := edit1.Text ;
  sStaffName := edtUserName.Text ;
  sPassword := edit2.Text ;
  sAccessType := cbxAccessType.Items[cbxAccessType.ItemIndex] ;
  sContact1 := edtUserContact1.Text ;
  sContact2 := edtUserContact2.Text ;
  sEmergencyContact := edtUserEmergCont.Text;
  sEmail := edtUserContact1.Text + '@' + edtUserContact2.Text ;
  sAllergies := edtUserAllegies.Text ;
  sOccupation := cbxOccupation.Items[cbxOccupation.ItemIndex] ;
  sUserDOB := datetostr(dtpUserDOB.Date) ;

  WIth dmAPMP do
    Begin

      qryAPMP.SQL.Clear ;
      qryAPMP.SQL.Add('Select * FROM Staff Order By ID') ;
      qryAPMP.Open;
      qryAPMP.Last;
      qryAPMP.SQL.Clear ;

      qryAPMP.SQL.Add('Insert into Staff (ID , [Staff Member Name] , [Staff Member Surname] ,') ;
      qryAPMP.SQL.Add('[Date of Birth] , Occupation , UserName , Password , [Access Type],') ;
      qryAPMP.SQL.Add('[Contact 1] , [Contact 2] , [Emergency Contact] ,') ;
      qryAPMP.SQL.Add('[Email Address] , Allergies )') ;

      qryAPMP.SQL.Add('VALUES (' + QuotedStr(sUserID) + ',' + QuotedStr(sStaffName) + ',' + QuotedStr(sUserSurname)) ;
     

Open in new window

0
I'm working on a Delphi program which I'd like to link to a online database which should be accessible on any computer with the Delphi program running.

is it possible to link, and where can the database be hosted ,also how should the code look ?
0
I am using TIdTCPClient with SSL. After awhile of connecting, I get these exceptions in the debugger, and the client is disconnected:

    Project project1.exe raised exception class EIdOSSLUnderlyingCryptoError with message 'error:14086081:SSL routines:SSL3_ENC:block cipher pad is wrong'.

    Project project1.exe raised exception class EIdOSSLUnderlyingCryptoError with message 'error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac'.

And also, it raises "wrong ssl version" with those exceptions above.

I am using sslvSSLv3 on the client and server:

idSslHandler.SSLOptions.Method := sslvSSLv3;
idSslHandler.SSLOptions.Mode := sslmUnassigned;

What could be the problem?
0
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
i wanted to store a bunch of record into a .dat file

as example

username := something
pass := something

and read them later from that file how can i do that ?note that records needs to support unicode
0
I need a very precise timestamp as a string. So I used this code:

DateTimeToString(ts, 'yymmddhhnnsszzz', Now);

Open in new window


... which uses millisecond precision. This gives me something like this: 170818130726667

But I need a timestamp which should be at least 100 - 1000 times more precise AND it should fit into an Int64 (e.g. when the timestamp string is converted with StrToInt64Def).

The precise timestamp should be absolute (not be dependent on the time since system start).

I don't need it for measuring a duration but I need a TIMESTAMP.
0
Hi,
I want to develop a geo localization application under windows and another FMX application.
 They are interrelated.

I want to use Google Map or other components.

My brother has a shop. Its employees move on the roads. He wants to follow them on the map.
The goal is to track their real-time location of each employee (20 to 30 seconds of refresh).

1- The Windows application consults the positions of each employee on a map.
2- The FMX application will be installed in the mobile (Android) of the employees and transmit their positions to the windows application. Kind of  Map GPS tracking.

I have no ideas where to start, what components use(Google Map, ...), ...
Any examples please to begin?

Thank you for your help.
0
hi im using a system called paris, which has Delphi as its language.

Im a novice with Delphi

I need to get the hours and mins between 2 dates and times

date 1      date2
time 1     time 2

no idea where to start any help would be great
0
Hello guys,

I need the function from this DLL that can change my string to a correct string to use the codebar 128 font.

there is a dll created for this propose and I'd like to use it in my delphi application, could you help me on this?

http://www.jtbarton.com/Barcodes/BarcodeStringBuilderExample.aspx

regards
Alexandre
0
Hello Guys

I am trying to find where could I download font code 128 to use in my Crystal reports.

regards
Alexandre
0
I am writing a chess program and I am trying to build an elegant graphical interface. I checked Jose chess program (http://jose-chess.sourceforge.net/) and it uses chess true type fonts to build the chessboard with the pieces. I dont want to build a 3d chessboard, just a 2D. I wonder how emulate Jose behaviour of chess pieces? I mean, how I can use the chess TTF the way Jose does to display a 2D chessboard? Any suggestion?

regards
Lopem

Ps. By the way, I tried this code:

Var
BMP : Tbitmap;
begin
bmp := tbitmap.create;
bmp.width := 800;
bmp.height := 600;
bmp.canvas.font.name := 'Arial';
bmp.canvas.font.size := 18;
bmp.canvas.font.style := [fsbold];
with bmp.canvas do
begin
beginpath(bmp.canvas.handle);
SetBKMode(Handle, TRANSPARENT);
textout(100, 100, 'TESTING');
endpath(bmp.canvas.handle);
brush.color := clBlue;
pen.color := clblack;
pen.width := 5;
StrokeAndFillPath(Handle);
end;
bmp.savetofile('C:\test.bmp');
bmp.free;
end;

It makes a bmp outlined of any TT font, but it doesnt get the result I was expecting.

Also, I tried:

with Image1.Picture.Bitmap.Canvas do
begin
  Font.Color := clBlue;
  Brush.Stule := bClear;
  Font.Size := 13;
  Font.Name := "Chess Merida";
  TextOut(10,10,'k');
end;

but the result is poor, like in the ZZZZZZ chess program (see image). Any ideas?

I have to tell you that also Chessbase (a chessgames database) use the same approach as the Jose chess program so I guess the code cant be so difficult …
0
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
i have two form , form "Old and New" in "Old" form i have  a combo box, and inside that combo box there are 3 items name "x,y,z". is it possible to get item from "Old" form to put in the second form (form "New")?

i want to make like this in my second form :

if combobox1.text:='x' then
begin..

the 'x' item is in the combobox in "Old" form, and the code above is in the "New" form, will it be possible? bcoz i got error when i try it. thx a lot for answering
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

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.