Create DWORD(32-bit) "DefaultDropEffect"
value="4" - create Shorcut for drag and drop
value="0" - normal
HKEY_CLASSES_ROOT/*/DefaultDropEffect
C# Code for creat shortcut link for mouse drag and drop
CreateShortCut(4); // Function Cll
#region "Drag And Drop"
private void CreateShortCut(int iAction)
{
RegistryKey registryKey = Registry.ClassesRoot.CreateSubKey("*");
if (registryKey == null)
{
throw new Exception("CreateSubKey failed");
}
if (iAction != 0)
{
registryKey.SetValue("DefaultDropEffect", iAction, RegistryValueKind.DWord);
}
else
{
registryKey.DeleteValue("DefaultDropEffect", false);
}
registryKey.Close();
registryKey = Registry.ClassesRoot.CreateSubKey("AllFilesystemObjects");
if (registryKey == null)
{
throw new Exception("CreateSubKey failed (AllFilesystemObjects)");
}
if (iAction != 0)
{
registryKey.SetValue("DefaultDropEffect", iAction, RegistryValueKind.DWord);
}
else
{
registryKey.DeleteValue("DefaultDropEffect", false);
}
}
#endregion