Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi variabel HostName in einem String einzugeben (https://www.delphipraxis.net/79917-variabel-hostname-einem-string-einzugeben.html)

PeterKiers 31. Okt 2006 09:54


variabel HostName in einem String einzugeben
 
Hallo,

ist es möglich eine variabel HostName in einem String einzugeben

zb.

Code:
'you must disconnect' + HostName + 'Do you want to disconnect now?'
Nun sieht in meine Prozedure bis jetzt so aus:

Code:
procedure TMainForm.Warning1;
begin
  if (Application.MessageBox( 
    'You must disconnect before opening another connection.' + #10 + #13 + 
    'Do you want to disconnect?',
    'Access2All',
    MB_YESNO + MB_DEFBUTTON1 + MB_ICONEXCLAMATION) = ID_YES) then
  begin
    Disconnect1Click(self);
    Connect1click(self);
  end;
end;
könnt ihr mir vieleicht zeigen wie man sowas macht?
danke schonmal für eure antworten,

Peter Kiers

marabu 31. Okt 2006 10:06

Re: variabel HostName in einem String einzugeben
 
Hallo Peter,

string concatenation machst du doch schon selbst:

Delphi-Quellcode:
begin
  if (Application.MessageBox(PChar('You must disconnect from ' + HostName
       + ' before opening another connection.' + sLineBreak
       + 'Do you want to disconnect?'),
// ...
Grüße vom marabu

PeterKiers 31. Okt 2006 10:21

Re: variabel HostName in einem String einzugeben
 
Danke...

Peter Kiers


Alle Zeitangaben in WEZ +1. Es ist jetzt 19:52 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz