Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

config form

Status
Not open for further replies.

mkzw0ot4m0nk

Programmer
Jul 19, 2002
29
0
0
US
hey, i made a program that shows the current song that is being played on winamp and the song name uploads to my site. many of my friends want this program and i dont mind them using it but i have it configured for me. how can i make a configure form so they can enter there ftp stuff and click ok and it will then be configured for them? im using IdFTP heres the section of code for that.

IdFTP1.Host := 'ftp.myurl.com';
IdFTP1.User := 'myusername';
IdFTP1.Password := 'mypassword';
IdFTP1.Connect(true);
IdFTP1.ChangeDir('public_html/mystuff);
IdFTP1.Put('c:\currentsong.txt','currentsong.txt',false);
IdFTP1.Disconnect;

THANKS
 
a if command if the configure window is open it wont try to connect!!
 
Well surely it only tries to connect once when you start the application... at which point the config form won't be open?

But if you just want to know if the form's open, just do
if configForm.Visible
 
so couldnt i do something like
if configForm.Visible
IdFTP1.Disconnect;
 
why dosnt..

if edit1.text <> lastsong then
begin

if Form2.Visible < 0 then

begin
ini := TIniFile.Create(ExtractFilePath(Application.ExeName) + 'settings.ini');
lastsong := edit1.text;
Idftp1.Host := ini.ReadString('Settings', 'FTP', '');
Idftp1.User := ini.ReadString('Settings', 'username', '');
Idftp1.Password := ini.ReadString('Settings', 'password', '');

it highlights
if Form2.Visible < 0 then and puts the | after then
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top