03-11-24, 05:04 PM
وجدت هذا الكود لإنشاء مجلد داخل مجلد الـ Images ولكن لم أعرف كيف أكمله
كيف أغير كود الصورة ليتوافق مع الكود السابق
كود :
Dim folderPath As String = Path.Combine(Application.StartupPath, "\Images\")
If Not Directory.Exists(folderPath) Then
' Create folder with a unique ID
Dim uniqueID As String = Guid.NewGuid().ToString()
Dim newFolderPath As String = Path.Combine(folderPath, uniqueID)
Directory.CreateDirectory(newFolderPath)
Console.WriteLine("New folder created at: " & newFolderPath)
Else
Console.WriteLine("Folder already exists at: " & folderPath)
End Ifكيف أغير كود الصورة ليتوافق مع الكود السابق
كود :
Dim imagePath As String = folderPath & ID.ToString & ".jpg"
Dim ms As New MemoryStream
Car_Doc.Image.Save(ms, Car_Doc.Image.RawFormat)