بسم الله الرحمن الرحيم
ما هو الكود الذي يقوم بحفظ ملف في القرص الصلب ، وكود آخر يقوم بفتح الملف الذي تم تخزينه
في البرنامج ويكون امداد الملف مثلاً TXT .
وشكرا ً![]()
بسم الله الرحمن الرحيم
ما هو الكود الذي يقوم بحفظ ملف في القرص الصلب ، وكود آخر يقوم بفتح الملف الذي تم تخزينه
في البرنامج ويكون امداد الملف مثلاً TXT .
وشكرا ً![]()
مروان صادق
in which programming language u need this?
الكود في لغة الفيجوال بيسك 6.0
مروان صادق
إليك كود فتح الملف
Private Sub open_Click()
Dim sFile As String
If ActiveForm Is Nothing Then LoadNewDoc
With Dialog
.DialogTitle = "Open Document"
.CancelError = False
.Filter = "Ringo Text Files (*.TXT*)|*.txt*"
.ShowOpen
If Len(.FileName) = 0 Then
Exit Sub
End If
sFile = .FileName
End With
ActiveForm.Rtftext.LoadFile sFile
ActiveForm.Caption = sFile
End Sub
وإليك كود حفظه
Dim sFile As String
If ActiveForm Is Nothing Then Exit Sub
If Left$(ActiveForm.Caption, 8) = "Document" Then
With Dialog
.DialogTitle = "Save Document"
.CancelError = False
.DefaultExt = "RW"
.Filter = "Ringo Word Documents (*.RW*)|*.RW*"
.ShowSave
If Len(.FileName) = 0 Then
Exit Sub
End If
sFile = .FileName
End With
ActiveForm.Rtftext.SaveFile sFile
ActiveForm.Caption = sFile
Else
sFile = ActiveForm.Caption
ActiveForm.Rtftext.SaveFile sFile
End If
End Sub
مع العلم إنك ستقوم بإنشاء Command Dialog 6.0 من قائمة Project - Components
sorry...i only use dotNet languages...
شكرا ً لك أخوي رنجوجيت vbmenu_register("postmenu_3004607", true);
على الكود ..
مروان صادق