locked
Window created but not shown. RRS feed

  • Question

  • I'm creating a window with a specified style of WS_POPUP and giving it a parent handle. The function is to return a handle to the created window. It does so but the window does not show.

    WindowAttachment wa = new WindowAttachment();

    IntPtr pass = WinAPI.CreateWindowEx(0, "tooltips_class32", "myWindow", WinAPI.WindowStyles.WS_POPUP,0,0,wa.Width,wa.Height, Handle, IntPtr.Zero,IntPtr.Zero,IntPtr.Zero);

    I'm not using the wa.Show() because i need the style set and I need it to have an owner.
    WindowAttachment is a form so you aren't confused. 


    Dim Blondedude092 as SkypeUser

    • Moved by CoolDadTx Friday, September 11, 2015 5:10 PM Winforms related
    Friday, September 11, 2015 12:32 AM

Answers

  • Try adding WS_VISIBLE to the styles.
    • Proposed as answer by Youjun Tang Monday, September 21, 2015 1:46 AM
    • Marked as answer by Youjun Tang Wednesday, September 23, 2015 6:43 AM
    Friday, September 11, 2015 6:49 AM