CSharpSlam.MessageBoxHelper.MessageBoxCenterHelper.Prep C# (CSharp) Method

Prep() public method

public Prep ( Window form ) : void
form System.Windows.Window
return void
            public void Prep(Window form)
            {
                NativeMethods.CenterMessageCallBackDelegate callBackDelegate = new NativeMethods.CenterMessageCallBackDelegate(CenterMessageCallBack);
                GCHandle.Alloc(callBackDelegate);
                parentFormHandle = new WindowInteropHelper(form).Handle;
                messageHook = NativeMethods.SetWindowsHookEx(5, callBackDelegate, new IntPtr(NativeMethods.GetWindowLong(parentFormHandle, -6)), NativeMethods.GetCurrentThreadId()).ToInt32();
            }
MessageBoxHelper.MessageBoxCenterHelper