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

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
Im a Delphi programmer with som old HTML experience. I want to go JS node and Typescript. Where should i start? What do i need to know before i start with JS node and Typescript or is it just to go?
0
My Application uses FdMemTable and load a file called users.xml. every thing is nice until I the application is used by local network.
Several users try to open the same file at the same time! An exception rises!
I found a function that might help me but "createFile" is  not recognized also GENERIC_READ or GENERIC_WRITE  by the compiler. Please Help!  

function TDataContainer.IsFileInUse(fName : string) : boolean;
var //fNAME is the adress of the file to check if is in use
HFileRes : Thandle;
begin
 Result := false;
 if not FileExists(fName) then exit;
 HFileRes :=createfile(pchar(fName),GENERIC_READ or GENERIC_WRITE,0, nil, OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0);
 Result := (HFileRes = INVALID_HANDLE_VALUE) ;
end;
0
I have generated  .type library from some .dll which com dll.

//procedure TMDF4Reader.GetData(bTime: Integer; lFirstIndex: Integer; lLastIndex: Integer;
                              out pBuffer: OleVariant; out nValuesRead: Integer);
begin
  DefaultInterface.GetData(bTime, lFirstIndex, lLastIndex, pBuffer, nValuesRead);
end;
this function from .tlb file.

I want to call this function but this function does not accept olevarient.
I tried following way
var
vData : olevarient;


  vData := VarArrayCreate([0,0], varDispatch); // A Variant array

  boun.cElements := 1;
  boun.lLbound := 0;
  SafeArray :=  SafeArrayCreate(VT_DISPATCH, 1, @bounds);
if SafeArray <> nil then
begin

    TVarData(vData).VType := (VT_ARRAY  or VT_VARIANT or VT_DISPATCH);
    TVarData(vData).VArray  := PVarArray(SafeArray);
end;
     MDF4.GetData(1, 1, 10, &vData, &n); // Get the data form the time signal


please help me on this i stuck
0
Would like application loading TGauge to look like Windows 7
0
Can someone help me with a sample for drag and drop items between two livegrids (or stringgrid, or listboxes ...) in Fremonkey ?

I found a lot example on how to do it in Delphi Vcl but none in Firemonkey.

Thank you
Mac
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
Hi,

I am writing an ActiveX control that is a compound control based on ActiveForm. I would like to hide the "Height" property from the object inspector and during runtime as the height will be set by the control itself based on user actions. Is there any way of doing that? Even programatically setting the height in the CreateForm event or Initialize event doesn't seem to override the height set in the objetc inspector.
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
Hello,

My customer wants a software which recognizes registration plate number of the cars and store them in database.
I use Delphi Seattle.

How can I do that?

Thank you very much.
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
how to run tidtcpclient inside queued thread ? the client will beruns for a while and needed to handle somw gui when receive commands

and complete example on using queue correctly with tidtcpclient ?
0
hi,

is it possible
launch delphi desktop app from browser

thank you, H
0
Hello guys,

How do you set the datasource on TcxComboBox of (DevExpress).
0
Hi Team, I am trying to open "Tstoredproc" component - Parameter property by clicking on "...". Once I did this activity its(Delphi) getting hanged.
I just want to define one new parameter in to that component.

Please suggest, What Can i do.
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
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
Hi,

I've a problem that I'm unable to solve, here is the problem: Under Delphi and ussing VLC for Crystal XI, I want to read the configuration of printer in the report, and if I have, initialize a TPrintDlg with the read printer, the dialog initialize well but when I use the response I've an AV, here is my code (one of them). This code run when the user clic on the printer setup button on Crystal Viewer.

procedure TdmlReportServices.crpMainwOnPrintSetupBtnClick(WindowHandle: HWND; var Cancel: Boolean);
var
  PrintDialog : CommDlg.TPrintDlg;
  InitializeDeviceMode, ReturnDeviceMode: PDeviceMode;  // Hay que usar dos, una para inicializar y otra para devolver config, si no error de punteros

  sName, sDriver, sPort: String;
  PrintDlgInitialized: Boolean;
  hInitializeDeviceMode: HGLOBAL;
begin

  // Si la versión del componente de la VCL es el 11
  if crpMain.Version.Crpe.Major = 11 then
  begin
    PrintDlgInitialized := False;

    // If the report has some printer configuration
    if crpMain.Printer.RetrieveFromReport(sName, sDriver, sPort, InitializeDeviceMode) = True then
    begin
      // Se ha podido recuperar la impresora del report
      if Assigned(InitializeDeviceMode) then
      begin
        PrintDlgInitialized := True;
        PrintDialog.hDevMode := HGLOBAL(InitializeDeviceMode);
      end;
    end;

    hInitializeDeviceMode := 0;
    Cancel := True; // Cancelamos el cuadro de diálogo por defecto de Crystal (Preparar página)…
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
In a Delphi Vcl Application, when I hover the mouse-pointer over a menu-item then I would like to dynamically show a thumbnail hint (determined at runtime) next to the menu item:

menuhint.png
Does anybody know how to achieve this?
0
The Delphi list of Standard Actions contains a Format section. These Format Actions control the formatting of selected text in TRichEdit.

When I assign one of these Format Actions (e.g. TRichEditBold) to a TToolButton then the assigned action contains an ImageIndex property:

screenshot.png
To which ImageList does this ImageIndex number refer? Is there a StandardRichEditFormat ImageList?
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.