Delphi-PRAXiS
Seite 1 von 2  1 2      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Delphi VS VB (https://www.delphipraxis.net/16050-delphi-vs-vbulletin.html)

agm65 9. Feb 2004 15:48


Delphi VS VB
 
Moin Leute, hier mal wieder ne vb - delphi frage..
ist es möglich den string wert einer text box zu speichern ?
in vb:

' läd den textbox inhalt
text1 = GetSetting(App.Title, Me.Name, "Test", "")

'speichert den textbox inhalt
Call SaveSetting(App.Title, Me.Name, "Test", text1)


:drunken:


thx cu agm65

Robert_G 9. Feb 2004 17:21

Re: Delphi VS VB
 
Zitat:

Zitat von VBA OH
SaveSetting Statement Example
The following example first uses the SaveSetting statement to make entries in the Windows registry (or .ini file on 16-bit Windows platforms) for the MyApp application, and then uses the DeleteSetting statement to remove them.

' Place some settings in the registry.
SaveSetting appname := "MyApp", section := "Startup", _
key := "Top", setting := 75
SaveSetting "MyApp","Startup", "Left", 50
' Remove section and all its settings from registry.
DeleteSetting "MyApp", "Startup"


agm65 12. Feb 2004 23:56

Re: Delphi VS VB
 
nein ich habe nicht gemeint ob es in visual basic geht sondern in delphi ??
das von mir ist der vb code !
also die frage nochmal gestellt für delphi !


danke !

Luckie 12. Feb 2004 23:59

Re: Delphi VS VB
 
Kuck dir in der Hilfe mal TRegistry oder alternativ TIni an.

agm65 13. Feb 2004 00:18

Re: Delphi VS VB
 
habe mir für die infi file entschieden und gleich weitere probleme :) ! achtung !

Write:

var ini: TIniFile;

ini:=TIniFile.create(ExtractFilePath(ParamStr(0))+ 'config.ini');
ini.WriteString('Benutzer','Name','Hans Muster');


Read:
var ini: TIniFile;

ini:=TIniFile.Create('config.ini');
try
txtappdir.Text := ini.ReadString('Benutzer','Top',0);
finally
ini.free;
end;

jetzt sagt der mir was von wegen string und integer ,...hab es schon mit inttostr versucht geht
aber ich will ja keinen zahlenwert, ich hätte gerne den wert für meine textbox oder mache ich da was falsch ?

supermuckl 13. Feb 2004 02:02

Re: Delphi VS VB
 
Delphi-Quellcode:
Write:

var ini: TIniFile;

ini:=TIniFile.create(ExtractFilePath(ParamStr(0))+ 'config.ini');
ini.WriteString('Benutzer','Name','Hans Muster');
ini.free;

Read:
var ini: TIniFile;

ini:=TIniFile.Create('config.ini');
try
txtappdir.Text := ini.ReadString('Benutzer','Top','0');
finally
ini.free;
end;

Luckie 13. Feb 2004 02:32

Re: Delphi VS VB
 
Delphi-Quellcode:
ini:=TIniFile.Create('config.ini');
Und du meinst, er findet deine Ini-Datei wieder?

agm65 13. Feb 2004 13:36

Re: Delphi VS VB
 
das frage ich dich ?

Luckie 13. Feb 2004 13:39

Re: Delphi VS VB
 
Das war eine rhetorische Farge, die dich zum Nachdenken anregen soll. :roll:

agm65 13. Feb 2004 13:43

Re: Delphi VS VB
 
vielleicht solle ich das ExtractFilePath(ParamStr(0))+
davor machen ?


okay dann sagt er mir was von wegen string und int

txtappdir.Text := ini.ReadString('Benutzer','Top',0); <- hierbei


aber mit inttostr bzw strtoint....geht es nicht ... ?? hier zu ne idee


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:19 Uhr.
Seite 1 von 2  1 2      

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