23-08-13, 08:31 AM
ahmed hussien كتب :PHP كود :
public sub newfiletype(byref programpath as string, byval extension as string, byref fileicon as string, byref description as string)
dim w as object
dim e as string
w = createobject("wscript.shell")
if vb.left(extension, 1) <> "." then
e = "." & extension & "\"
else
e = extension & "\"
extension = mid(extension, 2)
end if
w.regwrite("hkcr\" & e, extension & " file")
w.regwrite("hkcr\" & extension & " file\", description)
w.regwrite("hkcr\" & extension & " file\defaulticon\", fileicon)
w.regwrite("hkcr\" & extension & " file\shell\open\command\", programpath & " %1")
w.regwrite("hkcr\" & extension & " file\shell\", "open")
end sub
الأستخدام :
PHP كود :
newfiletype(application.executablepath, "txt", "g:\icon_96.ico", "notepad files")
يجب عمل ما فى الصورة كى يعمل الكود
![]()
هناك خطأ في هذا الكود ارجو لحل
إقتباس :if vb.left(extension, 1) <> "." then
يقول ان هناك خطا في vb
