We help IT Professionals succeed at work.

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.

Hello Guys,

I developed a simple project where I embebed an IE into a panel, it is ok so far.
I have two problems with my small project:

1) left and top of my IE created into a panel, I can't set it to left=0 and top = 0
2) I would like to have my IE created into my panel without any borderstyle. For this, I tried that command:
SetWindowLong(ie.Handle,GWL_STYLE,  GetWindowLong(ie.Handle,GWL_STYLE) and (not WS_CAPTION) or WS_THICKFRAME);

But I haven't had any success yet.
Web2.rar
the project has only one unit.pas and you can open it in any Delphi version. I use Delphi 2007.

After opening the project, click on the button Browse, it will create a IE into panel1, there is another button named "Mostra Pn" where a panel3 will hide or not and the IE in panel1 should resize automatically.

my code
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
  ie := CreateOleObject('InternetExplorer.Application');
  windows.setparent(ie.hwnd, panel1.handle);
  s:='http://www.microsoft.com';
  s:='https://mercado.khan.com.br/qualidade/historico.aspx';
  ie.Navigate(s);

  ie.fullscreen:=false;
  ie.MenuBar := False;
  ie.AddressBar := False;
  ie.Resizable := false;
  ie.StatusBar := True;
  ie.ToolBar := 0;

  ie.top    := 0;
  ie.left   := 0;
  ie.Width  := panel1.Width;
  ie.Height := panel1.Height+27;


  ie.visible := True;
// SetWindowLong(ie.Handle,GWL_STYLE,  GetWindowLong(ie.Handle,GWL_STYLE) and (not WS_CAPTION) or WS_THICKFRAME);  // I 

Open in new window

0
procedure TForm1.Button2Click(Sender: TObject);
var
yazi : string;
toplam:integer;
begin
yazi:=Edit1.Text;
dmcd.OraQuery1.Close;
dmcd.OraQuery1.SQL.Clear;
dmcd.OraQuery1.SQL.Text:='select * from KIMLIK'; //I get the data.
dmcd.OraQuery1.Open;
toplam:=dmcd.OraQuery1.RecordCount; //the count of the data is 25 here.
Label1.Caption:=toplam.ToString;
end;

procedure TForm1.Button3Click(Sender: TObject);
var
toplam:integer;
begin
toplam:=dmcd.OraQuery1.RecordCount;//When I put down the scroll bar of dbgirid, the number of data is 25587.
Label1.Caption:=toplam.ToString;
end;

Open in new window

0
rocedure TForm1.Button2Click(Sender: TObject);
var
yazi : string;
begin
yazi:=Edit1.Text;
dmcd.OraQuery1.Close;
dmcd.OraQuery1.SQL.Clear;
//dmcd.OraQuery1.SQL.Add('SELECT * FROM KIMLIK WHERE dosya_no= '+Edit1.Text ) ;
//dmcd.OraQuery1.SQL.add('SELECT * FROM KIMLIK WHERE ADI Like "'+Edit1.Text+'%"');

//dmcd.Oraquery1.SQL.Text:='SELECT * FROM KIMLIK WHERE lower(adi)='+ yazi;
//dmcd.Oraquery1.SQL.Text:='SELECT * FROM KIMLIK WHERE dosya_no='+ yazi; this is work

dmcd.Oraquery1.SQL.Text:='select * from KIMLIK where (name)=' +yazi;//this is not work
dmcd.OraQuery1.Open;
dmcd.OraQuery1.Active;
end;
Top

Open in new window

0
4.jpghi expert

the update service references operation in visual studio
how to do delphi (rad studio )?

how to update service references operation  in delphi?
0
Hey

I am new here and in my spare time (as a hobby) I try to make utilities for use at my school (I work at a school administration). For this I use Delphi XE7. But now I have a problem that I can't find a solution for. Hopefully you can help me with that.

I have recently been forced to communicate via a web service. For this I have to use the "sendmsg" function. In the imported supplied WSDL file, the function is defined as follows:

function  sendMsg(const accesscode: string; const userIdentifier: string; const title: string; const body: string; const senderIdentifier: string; const attachments: Variant; const coaccount: Integer; const copyToLVS: Boolean): Variant; stdcall;


The server with which I have to communicate describes the function as follows:

sendMsg

With this method you can send a message to the main account or a co-account of a specific user. Specifying the sender and / or attachment is optional.
•      string $accesscode: Web services password
•      string $userIdentifier: Unique field user of the recipient
•      string $title: Title of the message
•      string $body: Text of the message
•      string $senderIdentifier: Unique field user of the sender (optional)
•      mixed $attachments: Attachments (1 or more) in base64 encoding (optional)
•      integer $coaccount: Type of account ('0' = main account, '1' = co-account 1 or '2' = co-account 2…). $ coaccount is optional: if this is not specified then the message will be sent to the
0
I need to import text from PDF Files where columns need to be added to a Table.
Columns must be preserved in the Text File.

I have tried some, but they are either not doing the job properly or are too expensive ($ 2000.00)
0
type

     TUser=class(Tremotable) //1
     private
     FLastname:AnsiString;
     FFirstName:AnsiString;
     FID:Int32;
     public
     constructor create (id : integer ;firstname:string;lastname:string );
     published
         property id:int32 read fid write fid;
          property Lastname:AnsiString read FLastname write FLastname;
            property FirstName:AnsiString read FFirstName write FFirstName;
     end;

Open in new window

0
I am writing a C++ builder VCL application using embarcadero XE10.1.
I have a TMemo control on the main form and wish to determine the line of text in the Memo window that is clicked on with a mouse.
The TMemo control has several lines of text.
I suspect that the OnMouseDown event handler could be used but I need to know how to determine the line of text corresponding to the Y value in the event handler ?

Thanks,

Roger
0
The Delphi IDE creates ftFloats and I would prefer ftBcd and Currency data types.
0
Hello,
is it possible to "fake" a button click event? I mean, when i click on button1 then in button1 should be a button2 click.
I know it is not an good idea but how nevertheless can i do that?

Thank you.

procedure TForm1.Button1Click(Sender: TObject);
begin
    // Here should be a button2 click event
end;
0
I have recently updated Embarcadero RAD Studio to version XE 10.3.
I am less than satisfied with the new Code Completion feature as  compared to prior versions such as 10.2.3.
Is there any way that he code completion display in version 10.3 can be configured to be the original format that was used in previous versions ?
Apart from the abundance of superfluous information, the search on partial terms doesn't work.

I attach examples of each version of code completion for dereferencing a TButton control pointer variable as an illustration.
RADStudio10.3Codecompletion.JPG
RADStudio10.2Codecompletion.JPG
0
Hi
I am developing components with Delphi 10.3. Now I have the following problem: when I uninstall the package I get the error "Exception EPrivilege in modul rtl260.bpl at address …". I have to end the process and restart Delphi. After this the component is no longer installed, so I can rebuild and install it. Uninstalling again, same problem. Has anybody an idea how can I find the wrong code in the component?
0
Hi.

We have a legacy application, made with delphi, and we´re having a strange issue on Windows 10.

When we input login credentials in the application, it uses "Registry.OpenKeyReadOnly" and verify for a key in HKEY_LOCAL_MACHINE\SOFTWARE\<appname>.
Then it uses Registry.ValueExists, if the key doesn´t exist, it gives an error "please install application". If exists, it proceeds with login.

We never had an issue with Windows 7, both x86 and x64.

Recently we upgraded our stations to Windows 10. And the application was working for weeks. Now, some stations (some x86 and others x64) are returning the "please install application" error, even if the key exists. That happened in 4 stations yesterday, and today another 3 started having the same problem.

And that just happens with the current local user. If we run as administrator, it works. If another non admin user logs on that machine, it works too. If the same user logs in another machine, it also works (even if the current user in that machine is having the login issue).

I thought it might be a permission problem, but with Powershell, if I run "Get-ItemProperty Registry::HKEY_LOCAL_MACHINE\SOFTWARE\<appname>" I get all the keys informations. I can also see the keys with regedit.

Then I thought about some recent windows update, but my user (non admin) can login with the application in another station with all updates installed, and doesn´t work in mine.

Any ideas? Really lost here.
0
Hi,

I have DBCtrlGrid and on grid is connected TclientDataSet.
I Mark (OrderBefore.png) few squares and  and I edit them with
while ClientDataSet.eof

But when It is finished I Locate initial square, but The squares are on different place after editing.

Please help if zou have some idea, H
OrderBefore.png
OrderAfter.png
0
Delphi XML Data Bindings are proving tough to code for me. Learning how-to the correct way is my goal here. With the attached XML file, I am simply stuck as to the next thing I do to get any data into a memo control.

I am using Delphi 10.3 Community version, and am creating a new firemonkey app.

If someone could show how to get the most basic data out from the XML file attached onto a memo, it would be a great leap forward for me.

For clarity, I'm pretty much new to Delphi and I have tried many online resources (videos, tutorials, blogs) to get to grips with this, but even the included Delphi help file has minimal information as guidance.
MAIN2.xml
MAIN2.xdb
0
I have developped a service using Delphi XE10.1 Berlin.
One timer interval is T1, the other is T2 (20 and 120 seconds respectively).
The first when activated, processes some input and send emails using email component accordingly.
The second just write a line in a log file.
Sometime the input to process is very large, and it can last for 3 minutes.
What is strange, is that the other timer, that should be activated during that interval is not.
Is this related to the heavy work of the other ?
Shall I place a kind of ProcessMessages (not available in TService component) or something else to have the second timer working during the working time of the first one ?
Thanks
0
I have copied an example of a mirror image generator from Delphi.com with a view to using it in a C++ builder project.

I get the following error in the iteration of the for loop:

First chance exception at $74CBC5AF. Exception class EInvalidOperation with message 'Can only modify an image if it contains a bitmap'. Process BitmapMirror.exe (7408)

The code is as follows:

void __fastcall TForm1::Button1Click(TObject *Sender)
{   // load an image file into Image1
	// reverse the horizontal image (make a mirror image) and display in Image2
	TBitmap *bm;
	int i,j;
	TColor c;

	if(OpenDialog1->Execute())
	{
		Image1->Picture->LoadFromFile(OpenDialog1->FileName);
	}
	bm = new TBitmap();
	bm->Height = Image1->Height;
	bm->Width = Image1->Width;
	for(i=0;i< Image1->Width;i++)
	for(j=0;j<Image1->Height;j++)
		bm->Canvas->Pixels[Image1->Width-i][j] = Image1->Canvas->Pixels[i][j];  // <<<<< This line produces the run-time error
	Image2->Picture->Assign(bm);
}

Open in new window

0
I am trying to execute the code above using a Access database and a Dephi program, and I receive the error message 'Syntax error in CONSTRAINT clause' on clause ON DELETE CASCADE. How can I alter the Access Database Schema, creating one relation with ON DELETE CASCADE, with Delphi?
Thanks

var
  bd : TADOConnection;
  qry : TQuery;
Begin
    bd.ConnectionString := 'Provider=Microsoft.ACE.OLEDB.12.0;' +
      'User ID=Admin;Data Source=;Mode=Share Deny None;Jet OLEDB:' +
      'System database="";Jet OLEDB:Registry Path="";Jet OLEDB:' +
      'Database Password="";Jet OLEDB:Engine Type=5;Jet OLEDB:' +
      'Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;' +
      'Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:' +
      'New Database Password="";Jet OLEDB:Create System Database=False;' +
      'Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don''t Copy Locale on ' +
      'Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:'
      + 'SFP=False;Persist Security Info = False;';
    ConectionPropertyName := 'Data Source';
    bd.SetConnectionProperty(ConectionPropertyName, NomeBase);
    bd.connected := True;
    qry := TADOQuery.Create(Application);
    qry.Connection := bd;
    qry.sql.add('CREATE TABLE [MODELOHIDRODINAMICO] ([MDHID] INTEGER NOT NULL,'+
                '[MDHTITULO] VARCHAR(50) , PRIMARY KEY ([MDHID])');
    qry.sql.add('CREATE TABLE [VENTO] ([VENID] INTEGER NOT NULL,'+
                '[VENTIPODIRECAOGERAL] SMALLINT …
0
Hi

I use Delphi 10.3.

How can I load images from a resourcefile (.res) in a tImageCollection (I want to make an own component that uses tImageCollection and tVirtualImageList)?
similar like bmp.LoadFromResourceName('xy')

Thanks, Peter
0
I succeeded to migrated my large Delphi application from XE2 to XE10.1 Berlin
I use the IBX component
It works fine, except (not yet tested everything) for some TStoredProc (on XE2, everything was fine)
For example, I have this stored procedure in the Firebird database :

create procedure BriTay010 (Modele integer)
                   returns (Mini integer,
                            Maxi integer)
as
begin
 select min(Numero),max(Numero)
 from   Articles
 where  Modele_No = :Modele
 into   :Mini,:Maxi;
 Mini = nullif(Mini,0);
 Maxi = nullif(Maxi,0);
end^

Open in new window


And the code at execution  (F01 is a TForm, IBSP a TStoredProc object on it)

 F01.IBSP.Params.Clear;
 F01.IBSP.StoredProcName := 'BRITAY010';
 F01.IBSP.Params.CreateParam(ftInteger,'Modele',ptInput);
 F01.IBSP.Params.CreateParam(ftInteger,'Mini',ptOutput);
 F01.IBSP.Params.CreateParam(ftInteger,'Maxi',ptOutput);
 F01.IBSP.Params.ParamByName('Modele').AsInteger := someIntegerValue...;
 F01.IBSP.Prepare;
 F01.IBSP.ExecProc;

Open in new window


It crashed on the ExecProc :
Index XSQLDA out of range

No idea why, the parameters looks ok
0
Where can I find the procedure to be able to use TAcroPDF component in my Delphi application, that I migrated to Delphi XE10.1 Berlin ?
Thanks
0
I have copied the source of an Embarcadero C++ Builder XE2 project to a new PC and am trying to compile the project using Embarcadero C++ builder EX10.1 Berlin.
I get a compile error as shown below. the error is detected in a file called Functional. There is no such file in the Project folder.

Error message:

[bcc32 Error] functional(135): E2093 'operator<' not implemented in type 'string' for arguments of the same type
  Full parser context
    functional(134): decision to instantiate: bool operator less<string>::()(const string &,const string &) const
    --- Resetting parser context for instantiation...
    Unit2.cpp(6): #include Unit2.h
    Unit2.h(13): #include c:\program files (x86)\embarcadero\studio\18.0\include\dinkumware\map
    map(5): #include c:\program files (x86)\embarcadero\studio\18.0\include\dinkumware\xtree
    xtree(4): #include c:\program files (x86)\embarcadero\studio\18.0\include\dinkumware\functional
    functional(7): namespace std
    functional(131): class less<_Ty>
    functional(134): parsing: bool operator less<string>::()(const string &,const string &) const

The code where the compiler breaks is :

            // TEMPLATE STRUCT less
template<class _Ty>
      struct less
            : public binary_function<_Ty, _Ty, bool>
      {      // functor for operator<
      bool operator()(const _Ty& _Left, const _Ty& _Right) const
            {      // apply operator< to operands
            return (_Left < _Right);  //<<<<<<<<<<<<< This is the line which is shown as an error
            }
      };
0
I am migrating my Delphi XE2 application to Delphi XE10
It uses IBX to access (embedded) a FireBird database
Where can i find the (free) corresponding IBX compoments  to install it ?
0
Does anyone know what language this is? It is embedded within our ERP system. I need to add the word Symptoms above Reason for removal.

begin

IF
   WO_SYMPT_FAUL_ACT['SFA_TYPE'] = 'Symptoms' then 
begin

  Text := 'REASON FOR REMOVAL:';
end
else if
    WO_SYMPT_FAUL_ACT['SFA_TYPE'] = 'Faults' then 
begin

  Text := 'FAULT:';
end 
else if
    WO_SYMPT_FAUL_ACT['SFA_TYPE'] = 'Actions' then 
begin

  Text := 'TESTED WITHIN MFG SPECS:';
end 
else
begin
  Text :=  WO_SYMPT_FAUL_ACT['SFA_TYPE']
end;
end;

Open in new window

code.JPG
symptoms.JPG
0
Hello,
I get this error message, when I want to connect to MariaDB via FireDAC.
Where can I download the needed dll's?

I have downloaded the "MariaDB Connector/C x.x Series"  zip-file from this website https://downloads.mariadb.org/. But the dll's were not there.
My program is a 32-Bit application

Error message
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.