hi guis,.. i m starting to make tuts here, becouse so many people pm me and like to have more usefull tuts:
TUT #1
Stop you´re programm using / online with ftp server
difficulty : Advanced
we need:
1 form = form1
1 timer = timer1
1 label = label1
1 txt file = example : active.txt
1 txt file = example : reason.txt
>1< make a txt file and name it what ever you want, example: active.txt and reason.txt, in the reason.txt you can write a reason why youre programm is closing
and load it up to youre ftp server
>2< open up visual basic 2008 or 2010 > make a new project and name it what ever you want and add a timer1 and label1 to youre form
>3< double click on the form and give this code in Form1_Load :
Code:
Timer1.enable = true
Timer1.Interval = 1
>4< double click on the timer1 and give in this code:
Code:
Dim wc As New Net.WebClient
Try
wc.DownloadFile("http://youreserver.com/active.txt", My.Computer.FileSystem.SpecialDirectories.Temp & "\active.txt")
Label1.Text = "Active"
timer1.stop
' now here you can put in how to continue youre programm
Catch
Dim client As New Net.WebClient
Label1.Text = client.DownloadString("http://youreserver.com/reason.txt")
timer1.stop
' maybe here you can set me.close or something like that
End Try
on youreserver.com you have to put in youre ftp server, and if you now delete the active.txt from youre ftp server the label1 shows youre text from reason.txt ...
© 2010 GER-Domi TUT