السلام عليكم ورحمة الله وبركاته
إخواني انا اريد انشأ ملف في نفس المجلد اللي فيه ملف الexe
(المطلوب من البرنامج هو انه ينسخ ما بداخل المتغير filepa و(اللي بيكون داخله مسار) داخل الملف الذي اريد ان أنشأه)
المشكلة هي أنه يأخذ هذا المسار وينشئ الملف هناك فأرجوكم ساعدوني
وشكراً مقدماً
Imports system
Imports System.IO
Module pathp
Public pastr As String
Dim filepath As String = Form1.filepa
Public Sub setpath()
Dim pafile As New StreamWriter("path.dat", True)
pafile.Write(filepath)
pafile.AutoFlush = True
End Sub
Public Sub redpath()
Try
Dim pafile As New StreamReader("path.dat", True)
Try
pastr = pafile.ReadToEnd
If pastr.Length <> 0 Then
Form1.ComboBox2.Items.Add(pastr)
Else
MsgBox("There's not a path for your program nero... Please set one")
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
Catch ex As Exception
MsgBox("You haven't Assigned The Path Of Your Nero Program, Please Assing it")
End Try
End Sub
End Module
