Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x

Delphi

59K

Solutions

16K

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 show enable only button "Delete" on DBNavigator.

I use Delphi Berlim and I tried this way:

dbnvgr1.VisibleButtons := [nbDelete];

but not done!
0
Technology Partners: We Want Your Opinion!
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Hi,

I have delphi10.
And during insert procedure in MSSQL, sometimes I get exception...

Access violation at address 5D3CD9A2 in module  MSADO15.dll. Read of address 00000000.

Can somebody help...

Thank you
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
Free Tool: ZipGrep
LVL 10
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

How can i resize report title on runtime  in Fastreport and Delphi xe2
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
Within the a Anonymous Thread procedure I need to refer few variables from the Main thread. I do not need to change the values.
Please advice.
0
Dear My Friends, Hello,

How can I receive SMS ?

I'm using this code:

uses
  Androidapi.JNI.JavaTypes,
  Androidapi.JNI.Telephony,
  Androidapi.JNIBridge,
  Androidapi.JNI.GraphicsContentViewText,
  Androidapi.Helpers;
 
...
 
type
JTelephonySmsIntentsClass = interface(IJavaClass)
['{73FFA042-DAE3-497F-B9D4-B7F1B178E941}']
 
{class} function getMessagesFromIntent(intent: JIntent): TJavaArray<JSmsMessage>; cdecl;
 
{class} function _GetSMS_RECEIVED_ACTION: JString; cdecl;
{class} property SMS_RECEIVED_ACTION: JString read _GetSMS_RECEIVED_ACTION; end;
 
[JavaSignature('android/provider/Telephony/Sms/Intents')]
  JTelephonySmsIntents = interface(IJavaInstance)
['{42798E28-0E3A-4287-8EE9-606BB9D311B5}'] end;
 
TJTelephonySmsIntents = class(TJavaGenericImport<JTelephonySmsIntentsClass, JTelephonySmsIntents>) end;
 
...
 
procedure TForm1.BroadcastReceiverReceive(Context: JContext; Intent: JIntent);
var
i: Integer;
msgs: TJavaArray<JSmsMessage>;
msg : JSmsMessage;
phonenumber, body : string;
begin
 
  if Intent.getAction.compareTo(TJTelephonySmsIntents.JavaClass.SMS_RECEIVED_ACTION) = 0 then
  begin
 
  msgs := TJTelephonySmsIntents.JavaClass.getMessagesFromIntent(Intent);
  for i := 0 to msgs.Length - 1 do
        begin
        msg := msgs[i];
        phonenumber := JStringToString(msg.getOriginatingAddress);
        body := JStringToString(msg.getDisplayMessageBody);
        Memo1.Lines.Add(phonenumber + ' : ' + body);
        end;
 
  end;
 
end;

Open in new window


But there isn't any result for TMemo.

There isn't any error in my code but

JTelephonySmsIntentsClass(IJavaClass) - error
JTelephonySmsIntents(IJavaInstance) - error
TJTelephonySmsIntents = class(TJavaGenericImport<JTelephonySmsIntentsClass, JTelephonySmsIntents>) - ok

in Structure Window

I'm using Delphi 10.2 Tokyo - Android Platform.

Thanks, Greetings.
0
Does any Delphi developer use the new AMD CPU Ryzen Threadripper 1950X (16 cores x 3.40GHz, 32 Threads), with at least 32 GB memory?

Do you have noticed whether the Delphi IDE and compiling have become faster?
0
Hi experts
How I can avoid inserting duplicate records in tdxmemdata Delphi xe3
0
I need to read label Text again , after I select list box index ?
How can I do this ?                

ListBoxItem := TListBoxItem.Create(nil);
                ListBoxItem.Parent := ContactsListBox;
                image := TImage.Create(ListBoxItem);
                label_1 := TLabel.Create(ListBoxItem);

                ListBoxItem.Size.Height := 40;

                image.Align := TAlignLayout.Left;
                image.Bitmap.LoadFromStream(ContactsIMGStream);

                label_1.Align := TAlignLayout.Left;
                label_1.Width := 150;
                label_1.Text := SearchNameValue.Value;

                ListBoxItem.AddObject(image);
                ListBoxItem.AddObject(label_1);
0
Dear My Friends, Hello,

How can i get USSD code result to string in Delphi?

My USSD run code:

procedure TForm1.Button1Click(Sender: TObject);
var
  Intent : JIntent ;
  strNo : String;
begin
  strNo := 'tel:*101%23';
  Intent := TJIntent.Create ;
  Intent.setAction ( TJIntent.JavaClass.ACTION_CALL ) ;
  Intent.setData ( StrToJURI (  strNo ) ) ;
  SharedActivity.startActivity ( Intent ) ;
end;

Open in new window


It works, but i need get USSD code result to string.

For Delphi 10.2 Tokyo - Firemonkey Android Platform.

Thanks, Greetings.
0
in default dbgrid we just need to set the datasource,  but i dont find any datasuorce in stringgrid (TMS component) properties anyone can help ?
0
Concerto's Cloud Advisory Services
LVL 4
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Hi,

I have searched for good articles/tutorials/videos on using managed bindings with Delphi but other than this video: Introduction to MVVM - The Delphi Way https://www.youtube.com/watch?v=k64Skcn3d6E and this blog post: Using LiveBindings to Connect the UI to Objects https://www.adug.org.au/technical/vcl/using-livebindings-to-connect-the-ui-to-objects/ I haven't found much on using code based bindings with Delphi.

I would love to study the framework used for the BindingDemo in the video as a guide in creating/extending such a framework.

My idea is instead of using the live bindings designer in the IDE I would prefer the bindings to be explicitly specified in code:
FViewModel.bind(edtName, 'edtName.Text', 'Name'); // Bind to Properties
FViewModel.bind(edtEmail, 'edtEmail.Text', 'Email');
..
FViewModel.bind(btnSave, 'btnSave.Enabled', 'CanSave'); // Bind to Methods - through property

Open in new window


I am aware there are several more robust MVVM and ORM frameworks (mostly using attributes, not explicit binding) but a guide, tutorial or demo of creating a simple MVVM framework would be better for me to deepen my understanding of live bindings, generics and using Delphi's RTTI system.

I need a hold my hand example or any useful information on using managed bindings with Delphi.

Here is an extract from the screenshots of the video (with my ideas/queries) to get an overview of the code structure. (The author of the video indicated he would publish the source code but I have not found it)

Open in new window

0
i have DBgrid1 in form1,is it possible to get data from DBgrid1 and put in DBgrid2 in form2 ? so it will be like same data and same DBgrid in diffrent from
0
how to automatically adjust delphi DBgrid column ?
B4rry.png
0
Hi,

I have a doubt that If i need to place a GIF image in a corner of the form, what should i do?
I dont know how to insert the GIF image in delphi Form. Help me clarifying it with brief explanation                                                                

Thanks in advance...
0
Hi all,

Was wondering if someone would be able to help me. I get memory leaks and access violation errors when closing my application after scanning a qrcode with Zbar. I will post my code. Any help would be appreciated.

unit ScanUnit;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, sSkinProvider, Vcl.ExtCtrls, sPanel, Vcl.StdCtrls, sLabel, acArcControls, Zbar;

type
  TScanForm = class(TForm)
    ScanPanel: TsPanel;
    sSkinProvider1: TsSkinProvider;
    sLabel1: TsLabel;
    sRoundBtn1: TsRoundBtn;
    Memo1: TMemo;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormShow(Sender: TObject);
    procedure sRoundBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  ScanForm: TScanForm;

  //QR Barcode
  device: pansichar;
  proc : zbar_processor_t;
  symbol:zbar_symbol_t;
  image : zbar_image_t ;
  TID:cardinal;
  hThread : THandle;

  procedure IntegrerFenetre(WindowHandle: THandle; Container: TWinControl);
  procedure Gestionnaire(img: zbar_image_t; userdata: Pointer); cdecl;

implementation

uses
  DMUnit, MainUnit;

{$R *.dfm}
procedure SplitString (var arr : array of String; str_src : string);
var
    delimeter : string;
    idx : integer;
    

Open in new window

0
Dear Exchange Experts Group
I need some help.
1) I need a VCL component in Delphi XE to do the following in outlook 2007:
  a) Change the "old code area" to "new code area"
Example Read all Outlook 2007 contacts and switch from (04111) to (01511).

Thanks in advance for your help. Thank you
0

Delphi

59K

Solutions

16K

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.