السلام عليكم
في سؤال لي في المنتدى عن إمكانية أستعراض الصور بالمستعرض ... أفاد أحد الأخوة بمثال المرفق .. ووضع الكود للزر لأستعراض الملف المذكور رابطه ..
سؤالي : إذا لم يكن الملف أو الصورة موجود في مسار الرابط .. واريد إظهار رسالو ( عدم وجود الملف في المسار ) .. يعني تعديل على هذا الكود :
Dim intRetval As Integer
Dim strFile As String
Dim str1 As String
Dim str2 As String
str1 = Trim(Me.subtypes22)
str2 = Right$(str1, 4)
If str1 = "" Then Exit Sub
If str2 = "exe" Or str2 = "com" Or str2 = "bat" Then
Call Shell(str1)
Exit Sub
End If
strFile = GetPath()
' Handle the case that occurs when the
' chosen file is an executable file. In that
' case, set strFile to be an empty string.
If strFile = Me.subtypes22 Then strFile = ""
intRetval = acb_apiShellExecute(Me.hwnd, "open", _
str1, strFile, FixPath(str1), _
acbSW_SHOWNORMAL)
' Run the associated executable for the selected
' document. Use the chosen directory as the default
' path in that application. Use the "open" OLE
' action.والمثال كاملا هنا :
