You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Source/ExcelDna.IntelliSense/ToolTipForm.cs
+54-2Lines changed: 54 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -59,14 +59,66 @@ protected override void DefWndProc(ref Message m)
59
59
{
60
60
constintWM_MOUSEACTIVATE=0x21;
61
61
constintMA_NOACTIVATE=0x0003;
62
+
constintMA_NOACTIVATEANDEAT=0x0004;
63
+
constintWM_NCACTIVATE=0x86;
64
+
constintWM_NCHITTEST=0x84;
65
+
constintHTCLIENT=0x1;
66
+
constintHTCAPTION=0x2;
67
+
68
+
69
+
/* you must intercept the appropriate messages received from system (WM_SIZING and WM_MOVING) and set the position of the form with SetWindowPos() - this will force it to move!
70
+
71
+
In your Form's class:
72
+
73
+
public const int WM_SIZING = 0x0214;
74
+
public const int WM_MOVING = 0x0216;
75
+
76
+
[StructLayout(LayoutKind.Sequential)]
77
+
public struct RECT
78
+
{
79
+
public int Left;
80
+
public int Top;
81
+
public int Right;
82
+
public int Bottom;
83
+
}
84
+
85
+
[DllImport("user32.dll", SetLastError = true)]
86
+
private static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInstertAfter, int x, int y, int cx, int cy, uint flags);
87
+
88
+
protected override void WndProc(ref Message m)
89
+
{
90
+
if (m.Msg == WM_SIZING || m.Msg == WM_MOVING)
91
+
{
92
+
RECT rect = (RECT)Marshal.PtrToStructure(m.LParam, typeof(RECT));
0 commit comments