//方法1
HwndSource source = HwndSource.FromHwnd(new WindowInteropHelper(this).Handle);
if (source != null) source.AddHook(WndProc);
//方法2
//HwndSource source = PresentationSource.FromVisual(this) as HwndSource;
//if (source != null) source.AddHook(WndProc);
private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
// Handle messages...
if (msg == 0x219)//WM_DEVICECHANGE
GetCameraLoactionInfo();
InitCameraInfo();
return IntPtr.Zero;
<Window x:Class="FeederProject.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
今天在写DNN模块是发现这个错误
error CS0115:
“ASP.desktopmodules_flashimageshow_editflashimagerotator_ascx.FrameworkInitialize()”: 没有找到适合的方法来
重写
原来只是一个拼写错误,我ascx文件中Inherits="MyClass" 和 cs 文件中的 MyClass 名字不符,ascx中...