Plz help me
-
i want to replase pic from pictuerbox but its not worked thats my code dim Aids as Integer = DataSet11.Admin.Item(0).AID.Trim Dim fileinfo As String = OpenFileDialog1.FileName.Trim '//new Pic file Dim fileex As String = Path.GetExtension(fileinfo.Trim) Dim newdrfile As String = "C:\GymProg\Adminpic\" + AIDS.ToString.Trim + fileex.Trim '// new dirctry file Dim oldpic As New FileInfo(DataSet11.Admin.Item(0).Pic.Trim) '// old pic thes is Problem Because oldpic.Path = newderfile.Path '//Delete old Pic If File.Exists(oldpic.FullName) = True Then oldpic.Delete() ''//The process cannot access the file "C:\GymProg\Adminpic\1.gif" because it is being used by another process. another Process like pictuerbox1.image path End If '//creat new Pic FileCopy(fileinfo.Trim, newdrfile.Trim) Ahmed El-Badry