还是得修改注册表哦。
[HKEY_CLASSES_ROOT/.dfm]
@="DelphiForm"
[HKEY_CLASSES_ROOT/.dpk]
@="DelphiPackage"
[HKEY_CLASSES_ROOT/.dpr]
@="DelphiProject"
[HKEY_CLASSES_ROOT/.pas]
@="DelphiUnit"
同时要确保以下值正确
[HKEY_CLASSES_ROOT/DelphiPackage]
@="Delphi Package"
[HKEY_CLASSES_ROOT/DelphiPackage/DefaultIcon]
@="C://Program Files//Borland//Delphi7//Bin//delphi32.exe,3"
[HKEY_CLASSES_ROOT/DelphiPackage/Shell]
[HKEY_CLASSES_ROOT/DelphiPackage/Shell/Open]
@="&Open"
[HKEY_CLASSES_ROOT/DelphiPackage/Shell/Open/command]
@="C://Program Files//Borland//Delphi7//Bin//delphi32.exe /np"
[HKEY_CLASSES_ROOT/DelphiPackage/Shell/Open/ddeexec]
@="[open(/"%1/"
]"
[HKEY_CLASSES_ROOT/DelphiPackage/Shell/Open/ddeexec/Application]
@="DELPHI32"
及其它类型相似。
就能恢愎 打开方式和图标了。我测试过了