Advertisement
ferdhika31

Hapus Tambah File/Gambar

May 8th, 2014
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.52 KB | None | 0 0
  1. 'Menghapus Gambar'
  2.                 Try
  3.                     My.Computer.FileSystem.DeleteFile(Destination & txtUname.Text & ".jpg")
  4.                 Catch ex As Exception
  5.  
  6.                 End Try
  7.                 'Menambah Gambar'
  8.                 If System.IO.File.Exists(Destination & txtUname.Text & ".jpg") Then
  9.                     MsgBox("Foto Gagal Ubah!", MsgBoxStyle.Information)
  10.                 Else
  11.                     System.IO.File.Copy(FileAdress, Destination & txtUname.Text & ".jpg")
  12.                 End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement