Click here to Skip to main content
15,886,963 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi. i am creating a win form in which i am making a download manager. In this form i want to save the file location on the click of check box. Means when user click on check box it should create the file automatically and save all the downloaded file inside the folder.
Posted

1 solution

so whats the problem you can use checkbox checked changed event
VB
Private Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
        If CheckBox1.Checked = True Then
        Directory.CreateDirectory("Path")
        System.IO.File.Create("Path\filename.txt")
        Dim sw As StreamWriter = New StreamWriter("FileName")
        sw.Write("Your Information")               
        End If
    End Sub
 
Share this answer
 
v3
Comments
shashank 1068 20-May-13 2:46am    
how do i save the save when the checkbox is checked?
i want to save the file before downloading files

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900