code_junkie

Implement sticky overlays in .NET

Nov 13th, 2011
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. [DllImport("user32.dll", SetLastError: true, CharSet: CharSet.Auto)]
  2. public def SetParent(child as IntPtr, parent as IntPtr):
  3. pass
  4.  
  5. def createAttachedForm(parentHandle as IntPtr):
  6. f = Form()
  7. f.Text = "My overlay"
  8. f.Show()
  9. SetParent(f.Handle, parentHandle)
  10. Application.Run(f)
  11.  
  12. Form.Show(IWin32Window w)
Add Comment
Please, Sign In to add comment