Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. 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

Hello,

I tried this : http://blog.marcocantu.com/blog/xe5_anonymous_showmodal_android.html

and my problem is that using this code:

var
  dlg: TForm1;
begin
  dlg := TForm1.Create(nil);
  // select current value, if avaialble in the list
  dlg.ListBox1.ItemIndex := dlg.ListBox1.Items.IndexOf(Edit1.Text);
  dlg.ShowModal(
    procedure(ModalResult: TModalResult)
    begin
      if ModalResult = mrOK then
      // if OK was pressed and an item is selected, pick it
        if dlg.ListBox1.ItemIndex >= 0 then
          edit1.Text := dlg.ListBox1.Items [dlg.ListBox1.ItemIndex];
      dlg.DisposeOf;
    end);

Open in new window


The  dlg.DisposeOf; gives Access Violation error.
I tried it with Free, but that gives the same error message.

How can I free the form then? Thank you.
0
Hire Technology Freelancers with Gigs
LVL 10
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Hello,

I bought Tms Fmx component and I am struggling with simple things.

I use TMSFMXLiveGrid which is connected to a datasource.
It automatically populated the columns.
But I want certain columns to show certain fields. However, when I click a column's properties in Object inspector I can't see field name property.
How can I set that a column should use a certain field?

Thank you.
0
I succesfully wrote my first Delphi app for smartphone (Android).
A button to click, a edit field, a label
When clicking on the button, the text in the edit field is copied in the label text : Label1.Text := 'Hello ' + Edit1.Text + ' ! ';
Also, at design time, I put "Hello" in the text property of Label1
Now at execution time (test on the PC),  clicking the button has no effect !
In debug mode, I put a break point on the statement label1.Text := ... but it never stops there
What's missing ?
Here is the code of Unit1 :

unit Unit1;
interface
uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls,
  FMX.Controls.Presentation, FMX.Edit;
type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Label1: TLabel;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Déclarations privées }
  public
    { Déclarations publiques }
  end;
var
  Form1: TForm1;
implementation
{$R *.fmx}
// {$R *.iPhone47in.fmx IOS}
procedure TForm1.Button1Click(Sender: TObject);
begin
 Label1.Text := 'Hello ' + Edit1.Text + ' !';
end;
end.
0
I have a IdHTTPServer and i want implement the support for handle both http and https request. There are my consig

FSSLHandler := TIdServerIOHandlerSSLOpenSSL.Create(nil);
FSSLHandler.SSLOptions.CertFile     := 'certificate.pem';
FSSLHandler.SSLOptions.KeyFile      := 'key.pem';
FSSLHandler.SSLOptions.RootCertFile := 'chain.pem';

FIdHTTPServer.Bindings.Add.Port := 443;
FIdHTTPServer.IOHandler := FSSLHandler;

FIdHTTPServer.Activate := true;

Open in new window


in the server directory i have ssleay32.dll and ssleay32.dll v1.0.2l (Win32) downloaded from http://indy.fulgan.com/SSL/

when i make a request from Chrome, in the security tab of the developer tool i see:

YLrb4.png
Also, analyzing the server with sslyze i have some others security issue (see VULNERABLE label):

> sslyze --regular local.XXXXXXXXXXXXXX.com:4343

SCAN RESULTS FOR LOCAL.XXXXXXXXXXXXXX.COM:4343 - 127.0.0.1
 --------------------------------------------------------

 * SSLV2 Cipher Suites:
      Server rejected all cipher suites.

 * TLSV1_1 Cipher Suites:
     Preferred:
        None - Server followed client cipher suite preference.                                                            
     Accepted:
        TLS_RSA_WITH_AES_256_CBC_SHA                      -              256 bits                                                                  
        TLS_RSA_WITH_CAMELLIA_256_CBC_SHA                 -              256 bits                                    
0
Hi,

In SQL Server Express I have a Stored Procedure that will rebuild or reorganize indexes based on their fragmentationlevel.
See: http://sqlfool.com/2011/06/index-defrag-script-v4-1/
This process might take a considerable amount of time in a big database.
This script uses some parameters, but I can set them all to defaults, so I can skip that part.

When my Delphi application starts the procedure, it will wait for completion, resulting in Time-out for query errors. I could extend the time-out but I would still have to wait for completion. Which I don't wait.

I only want to start the procedure and work in my application again. I need no result back. Let SQL Server do the work in the background. The SP has it's own timelimit which can be set.

How can I set this up in a way that meets my needs?
Please keep in mind that I run on SQL Server Express, which might limit my options.
0
I use a TIDMessage component (M) to read emails in a Delphi application
Sometime I get as unique first line of the body (M.Body[0]) this : "This is a multipart message in MIME format"
Where can I get the real body of this message ?
Thanks !
0
need some help with this batch script
I use alwaysup.exe to run my .exe as system ,here u can see some pugins:  https://www.coretechnologies.com/products/AlwaysUp/Plugins/

I decide to use this plugin:
Stop/restart your application if a specific string is found in a log file

Command Line Usage
	CheckLogFileForFatalError.exe <file-name> -e <error-string>
		[-ok <ok-string>] [-v]
where
	<file-name> is the full path to the file to be checked
		- Please enclose in quotes if the path contains spaces.
		- Note that this file name can contain special macro-like
		strings that will be dynamically replaced when the program
		is run. These are:
			$DAY == The current 2-digit month (01-12)
			$MONTH == The current 2-digit day (01-31)
			$YEAR2 == The current 2-digit year
			$YEAR4 == The current 4-digit year
		For example, if today is May 26 2011, then:
			C:\Files\Myfile_$MONTH_$DAY_$YEAR4.log
		will be expanded to
			C:\Files\Myfile_05_26_2011.log
		when the utility is run.

	<error-string> is the error message to look for in the file
        There can be multiple error-strings, and at least one must be specified.

	<ok-string> is a message that signals that the software is ok.
        If it appears after all the error strings, a restart will not be
        signaled. An ok-string is not required but multiple can be specified.

	-v signals to produce verbose output (optional)

        Note: All strings are case sensitive.
Example
To check if a log file located at 

Open in new window

0
Hello,

I have made an Android app in Delphi which sends Sms to some phone numbers.

It works well on my phone but at one of my customer (who has Android 7 on his phone ) it works like this:
- it sends about 10-15 SMS-es without error
- then "Android error: java.lang.UnsupportedOperationException: Sms is not supported" pops up

What can cause the problem at customer's site?
Thank you very much for your help.
0
How to Fix compress file I used ZLib  in Delphi 10.2
0
Hello guys

I have this link :
http://apps.widenet.com.br/busca-cep/api/cep/09780-470.xml
and it returns me this xml in my browse:

<cep>
<status>1</status>
<code>09780-470</code>
<state>SP</state>
<city>São Bernardo do Campo</city>
<district>Nova Petrópolis</district>
<address>Rua Dom Bernardo José Bueno Miele (Jd Palermo)</address>
</cep>

Open in new window


I am trying to get it in my delphi code, but I am having problem with it, this is my function:

function RetornoHttpGet(sEndereco: String): String;
  var
    s,str: string;
    IndIni: integer;
    IndFim: integer;
    acesso: TIdHTTP;
begin


  acesso := TIdHTTP.Create(nil);
  acesso.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(acesso);
  acesso.Request.Accept := 'text/html, */*';
  acesso.Request.UserAgent := 'Mozilla/3.0 (compatible; IndyLibrary)';
  acesso.Request.ContentType := 'application/x-www-form-urlencoded';
  acesso.HandleRedirects := True;
  try
    s := acesso.Get(sEndereco);
    freeandnil(acesso);
    Result := s
  except
    Result := '';
  end;

end;

Open in new window


could you help me on this?
I got this error: HTTP/1.1 403 Forbidden

Thanks
Alex
0
Free Tool: IP Lookup
LVL 10
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

I have TadvNavBar and pagecontrol1, in TAdvNavBar1 i have 3 panels ( AdvNavBarPanel1, AdvNavBarPanel2, AdvNavBarPanel3) and in page control there are 3 tab (tabsheet1, tabsheet2 , tabsheet3), is it possible when i click AdvNavbarPanel1 = tabsheet1 active, and so on with Advnavbarpanel2 and Advnavbarpanel3..

this is my sintax but its get error:

procedure TForm1.AdvNavBar1Click(Sender: TObject);
begin
pagecontrol1.ActivePageIndex:=Tadvnavbar(sender).Panels
end;

anyone can help?
0
Any time that I click on the Factoring option on the main menu in a C++ builder project whilst in the code editor, the drop-down menu shows No Refactorings Available ? This is the same in RAD studio 10.2 C++ builder.
Is there a video tutorial showing how to use the Refactoring functionality or is it possible that it needs to be enabled somewhere ?
The written help on the subject just doesn't work on my PC.
0
Hello, Guys

I need create a app with Delphi MDI but my problem is how create MDI Form with screen login.

when I create a form login and call form2 "app" I received erro no can use MDI form No MDI forms are currently active
0
Hello guys,

I need send all data of Excel from database mysql. And I do this with Delphi Berlim.

I create a procedure for do that.

procedure TCadastroDeFornecedor.PegaExcel_e_importa(Arquivo: string);
var
  planilha, sheet: OleVariant;
  linha, coluna: Integer;
begin
  //Crio o objeto que gerencia o arquivo excel
     planilha:= CreateOleObject('Excel.Application');

     //Abro o arquivo
     planilha.WorkBooks.open(Arquivo);

     //Pego a primeira planilha do arquivo
     sheet:= planilha.WorkSheets[1];


     //Aqui pego o texto de uma das células
     linha:= 0;
     coluna:= 0;
     ShowMessage(sheet.cells[linha, coluna].Text);


     //Fecho a planilha
     planilha.WorkBooks.Close;

end;

Open in new window


but I received error:  OLE error 800a03ec
0
Hello guys

I have a form that is in the midle of my screen. There is a button on it and I'd like to move the mouse on over it.

how could I do that? I tried some code and I haven't had sucess so far.

thanks
alex
0
I would like to know how to compute the x-intercepts of a cubic graph based in a given equation. If there is a formula that does this, then i would like to know this formula, if not then i would like to know the steps required to compute said values.
0
Please excuse me if this is a trivial question - but I looked around and could not find the answer.

  TFileData = class
    private
    PositionInThePaths: Integer;
    function GetThePath: string;
    public
    FileName: string;
    FileSize: Int64;
    property ThePath: string read GetThePath;
    end;

  TDirectoryData = class
    ThePaths: TStringList;
    FileDetails: TObjectList;  //  TFileData instances
    end;

Open in new window


I have two classes. In order to save memory, I store the paths in ThePaths. I store the instances of TFileData in FileDetails. The file data should get at this data using PositionInThePaths. The whole thing is readonly with no updating.

How do I program the function GetThePath. Obviously, it is easy enough to do without using property.
0
Hello guys,

How do you set the datasource on TcxComboBox of (DevExpress).
0
Hello guys,

I need show enable only button "Delete" on DBNavigator.

I use Delphi Berlim and I tried this way:

dbnvgr1.VisibleButtons := [nbDelete];

but not done!
0
Ask an Anonymous Question!
LVL 10
Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Hello guys,

I have a procedure and I need get part of string.

procedure TEMPRESA.btn1Click(Sender: TObject);
var
  ArquivoOrigem: TFileStream;
  ConteudoBase64: TStringStream;
  Arquivo64EmString: String;
  MyFilesExtension:string;
  CaminhoPasta:string;
  Dia:string;
  Mes:string;
  Ano:string;
  Hora:string;
  Minuto:string;
  segundo:string;
  NomeLiteralImagem:string;

begin

     Dia        := FormatDateTime('dd', Date );
     Mes        := FormatDateTime('mm', Date );
     Ano        := FormatDateTime('yyyy', Date );

     Hora       := FormatDateTime('hh',now);
     Minuto     := FormatDateTime('nn',now);
     segundo    := FormatDateTime('ss',now);



  if Length(EdtOrigem.Text) > 0 then
  begin


    CaminhoPasta := 'C:\FlexByouERP\Anexos\'+Dia+Mes+Ano+Hora+Minuto+segundo;

Open in new window



In variable CaminhoPasta  I need get all after  'C:\FlexByouERP\Anexos\'

how do that?
0
Hello guys,

I need to insert the name of program in regedit to make the webbrowse works fine with IE 11

HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER) \SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BEHAVIORS\<your application name>

http://docwiki.embarcadero.com/Libraries/Seattle/en/SHDocVw.TWebBrowser

I am trying for a long time, but I am doing something wrong in my code, because it doesn't allow me to create.

My system runs as administrator

Function AtualizaWebBrowse: Boolean;
var
 reg        : TRegistry;
 openResult : Boolean;
 Str : string;
begin
  reg := TRegistry.Create(KEY_READ);
  Str := '\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BEHAVIORS\ ';
  reg.RootKey := HKEY_CURRENT_USER;

  if not reg.KeyExists(str + ExtractFileName( Application.ExeName ) ) then
  begin
    reg.OpenKey(Str + ExtractFileName( Application.ExeName ), True);
//    reg.Access := KEY_WRITE;
//		reg.WriteString(Str, ExtractFileName( Application.ExeName ));
  end;

  reg.CloseKey();
  reg.Free;

End;

Open in new window


and to work it seems that I need to inform the value of my key as:

https://msdn.microsoft.com/en-us/library/ee330730(v=vs.85).aspx#browser_emulation

I thank for any help
alex
0
Hi,

I'm using quickreport 6 and while porting an application I need a certain report structure that I'm unable to replicate. This is what I need:

GROUP HEADER 1 - Client address
  GROUP HEADER 2 - Date
    GROUP HEADER 3 - Invoice Number
      DETAILS - Items on this invoice
    GROUP FOOTER 3 - Summary for this invoice
GROUP FOOTER 1 -  Summary for this client

GROUP HEADER 1a - Summary by VAT
  DETAILS a - VAT Rate and amount per VAT rate
GROUP FOOTER 2a - Summary

Next client on next page

See screenshot of what it looks like in QR3, I just can't reproduce it in QR6

Screenshot
Does anyone have any bright ideas?
0
Hello Guys,

I have a component TsMaskEdit where put date for example:   10/12/2011.... I need record this register in database for this I need convert this TsMaskEdit fot   2011-12-11

How do that this.
0
Hello guys,

I´m beginner in tecnology Delphi before I would program in the language Adobe Flex and need help with Delphi.

My doubt is:

I have in a VCL a component "Combobox" This component is powered by a DataSouce that is powered by mysql. In the query I have the fields "FINANCIAL" and "ID" in the "Combobox" I show the "Financial" field. My client chooses and when I write to the database I do not want to write the text of the "Combobox" I want to record the "Id" of the choice.

How can I get this "Id"?

In my Delphi I have (TMS - DevExpress - JEDI - Native Components)
0
i have 1 combobox which have three item (item1, item2, item3) and 1 pagecontrol with 3 tab (tab1, tab2, tab3)  how to make if combobox item is "item1" than "tab1" in pagecontrol become active?

this is my code which isnt working  -_-


procedure Tdasses.FormCreate(Sender: TObject);
var cbox:tcombobox;
begin

if cbox.text = 'item1' then
    begin
  tabsheet1.Action;
    end

else if CBox.text = 'item2 then
    begin
    tabsheet2.Action;
    end

else if ComboBox1.text = 'item3' then
    begin
    tabsheet3.Action;
    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.