AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Delphi VS VB

Ein Thema von agm65 · begonnen am 9. Feb 2004 · letzter Beitrag vom 14. Feb 2004
Antwort Antwort
Seite 1 von 2  1 2      
Benutzerbild von agm65
agm65

Registriert seit: 21. Okt 2003
1.194 Beiträge
 
Delphi 2006 Professional
 
#1

Delphi VS VB

  Alt 9. Feb 2004, 15:48
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)





thx cu agm65
  Mit Zitat antworten Zitat
Robert_G
(Gast)

n/a Beiträge
 
#2

Re: Delphi VS VB

  Alt 9. Feb 2004, 17:21
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"
  Mit Zitat antworten Zitat
Benutzerbild von agm65
agm65

Registriert seit: 21. Okt 2003
1.194 Beiträge
 
Delphi 2006 Professional
 
#3

Re: Delphi VS VB

  Alt 12. Feb 2004, 23:56
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 !
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#4

Re: Delphi VS VB

  Alt 12. Feb 2004, 23:59
Kuck dir in der Hilfe mal TRegistry oder alternativ TIni an.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Benutzerbild von agm65
agm65

Registriert seit: 21. Okt 2003
1.194 Beiträge
 
Delphi 2006 Professional
 
#5

Re: Delphi VS VB

  Alt 13. Feb 2004, 00:18
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 ?
  Mit Zitat antworten Zitat
supermuckl

Registriert seit: 1. Feb 2003
1.340 Beiträge
 
FreePascal / Lazarus
 
#6

Re: Delphi VS VB

  Alt 13. Feb 2004, 02:02
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;
Das echte Leben ist was für Leute...
... die im Internet keine Freunde finden!
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#7

Re: Delphi VS VB

  Alt 13. Feb 2004, 02:32
ini:=TIniFile.Create('config.ini'); Und du meinst, er findet deine Ini-Datei wieder?
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Benutzerbild von agm65
agm65

Registriert seit: 21. Okt 2003
1.194 Beiträge
 
Delphi 2006 Professional
 
#8

Re: Delphi VS VB

  Alt 13. Feb 2004, 13:36
das frage ich dich ?
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#9

Re: Delphi VS VB

  Alt 13. Feb 2004, 13:39
Das war eine rhetorische Farge, die dich zum Nachdenken anregen soll.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Benutzerbild von agm65
agm65

Registriert seit: 21. Okt 2003
1.194 Beiträge
 
Delphi 2006 Professional
 
#10

Re: Delphi VS VB

  Alt 13. Feb 2004, 13:43
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
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 1 von 2  1 2      


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:56 Uhr.
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