C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Some IO Functions


Posted Date: 08 Sep 2008    Resource Type: Code Snippets    Category: VB.NET Syntax

Posted By: Initiotech       Member Level: Gold
Rating:     Points: 10



This Code has Some Basic File handling Codes Which may help You Guys


Private Sub DirectoryCreate(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Directory.CreateDirectory("c:\" & InputBox("Enter Name of Folder You want to Create"))
End Sub


Private Sub CreateFile(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
File.Create("c:\" & InputBox("Enter Name of File you want to create"))
End Sub

Private Sub CopyFile(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Try
Dim op As New OpenFileDialog
op.Filter = "All Files|*.*"
If op.ShowDialog() = Windows.Forms.DialogResult.OK Then
Dim sa As New SaveFileDialog
sa.FileName = "Copy of " & op.FileName.Remove(0, op.FileName.LastIndexOf("\") + 1)
sa.Filter = "All Files|*.*"
If sa.ShowDialog() = Windows.Forms.DialogResult.OK Then
File.Copy(op.FileName, sa.FileName)
End If
End If
Catch ex As Exception
MsgBox(ex.ToString, MsgBoxStyle.Information, "Error")
End Try
End Sub


Download Same For Demo.

================================================================================
Regards Hefin Dsouza


Attachments

  • Download Sample (20775-8540-IOFunctions.rar)



  • Responses


    No responses found. Be the first to respond and make money from revenue sharing program.

    Feedbacks      
    Popular Tags   What are tags ?   Search Tags  
    Functions  .  

    Post Feedback


    This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
    You must Sign In to post a response.
    Next Resource: Showing DateTime in dd\mm\yyyy format
    Previous Resource: Display Images Using Timer
    Return to Discussion Resource Index
    Post New Resource
    Category: VB.NET Syntax


    Post resources and earn money!
     
    Related Resources



    dotNet Slackers   BizTalk Adaptors    Web Design

    masks masks masks

    Contact Us    Privacy Policy    Terms Of Use