![]() |
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 |
Re: Delphi VS VB
Zitat:
|
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 ! |
Re: Delphi VS VB
Kuck dir in der Hilfe mal TRegistry oder alternativ TIni an.
|
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 ? |
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; |
Re: Delphi VS VB
Delphi-Quellcode:
Und du meinst, er findet deine Ini-Datei wieder?
ini:=TIniFile.Create('config.ini');
|
Re: Delphi VS VB
das frage ich dich ?
|
Re: Delphi VS VB
Das war eine rhetorische Farge, die dich zum Nachdenken anregen soll. :roll:
|
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 12:46 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