Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. windows disappearing issue

windows disappearing issue

Scheduled Pinned Locked Moved C#
csharphelpdotnetvisual-studioquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Calin Dragan
    wrote on last edited by
    #1

    hi, i developed for a comercial application a quite complex gui framework based on forms, with windows manager and docking manager, where the forms could have various contents, from datagrids to media players. it al works nice, except for one problem: i have a main form (something like a mainframe) and a set of owned forms. suposing that the main application form is MainFrame, for all the owned forms, let's say Owned1, Owned2, etc. i set OwnedX.Owner = MainFrame. the problem is that in some circumstancies my OwnedX forms end by being displayed, in the z-order, behind MainFrame form (i figured out that by making the MainFrame form semitransparent). when i click on either MainFrame form, or on any of the OwnedX that are still visible, everithing comes back to normal, and all the owned forms are displayed on top of the owner. the problem is that even if MSDN states that a owned form couldn't be displayed before owner form, it happens. let me mention again that in my application i have multiple forms, with a very diversified content (up to 5 media players, using IVideoWindow component, datagrids, all kind of controls, from editboxes to buttons). what is specific to my forms is that they don't have a captionbar and a border, i emulate them using HT_XXX notifications, but i doubt that this is the problem as everithing works fine until something triggers abnormal behaviour, when a owned form goes behind owner form, and when the owner form is activated by clicking on it the owned forms is displayed back on top of the owner form. i'm using visual studio 2005, .net framework 2.0 and windows xp with service pack 3 (it happened with service pack 2 too). i supose that is something in .net framework but, of course, i cannot tell where. if anybody has an idea on what cause that, or encountered the same problem, please try to explain me where i do wrong. best wishes, and thank you, calin

    Mircea PuiuM 1 Reply Last reply
    0
    • C Calin Dragan

      hi, i developed for a comercial application a quite complex gui framework based on forms, with windows manager and docking manager, where the forms could have various contents, from datagrids to media players. it al works nice, except for one problem: i have a main form (something like a mainframe) and a set of owned forms. suposing that the main application form is MainFrame, for all the owned forms, let's say Owned1, Owned2, etc. i set OwnedX.Owner = MainFrame. the problem is that in some circumstancies my OwnedX forms end by being displayed, in the z-order, behind MainFrame form (i figured out that by making the MainFrame form semitransparent). when i click on either MainFrame form, or on any of the OwnedX that are still visible, everithing comes back to normal, and all the owned forms are displayed on top of the owner. the problem is that even if MSDN states that a owned form couldn't be displayed before owner form, it happens. let me mention again that in my application i have multiple forms, with a very diversified content (up to 5 media players, using IVideoWindow component, datagrids, all kind of controls, from editboxes to buttons). what is specific to my forms is that they don't have a captionbar and a border, i emulate them using HT_XXX notifications, but i doubt that this is the problem as everithing works fine until something triggers abnormal behaviour, when a owned form goes behind owner form, and when the owner form is activated by clicking on it the owned forms is displayed back on top of the owner form. i'm using visual studio 2005, .net framework 2.0 and windows xp with service pack 3 (it happened with service pack 2 too). i supose that is something in .net framework but, of course, i cannot tell where. if anybody has an idea on what cause that, or encountered the same problem, please try to explain me where i do wrong. best wishes, and thank you, calin

      Mircea PuiuM Offline
      Mircea PuiuM Offline
      Mircea Puiu
      wrote on last edited by
      #2

      Hard to say what is actually causing the owned forms to go behind the owner one. You could try handle the Deactivate event of one of your owned forms and see what the call stack looks like.

      SkyWalker

      C 1 Reply Last reply
      0
      • Mircea PuiuM Mircea Puiu

        Hard to say what is actually causing the owned forms to go behind the owner one. You could try handle the Deactivate event of one of your owned forms and see what the call stack looks like.

        SkyWalker

        C Offline
        C Offline
        Calin Dragan
        wrote on last edited by
        #3

        hi, i tried to handle activate, deactivate, set focus, focus lost, position changed (as much as possible without entering a infinte loop). no efect. the callstack, and also the messages seen with windows spy, looks ok. it is something ouside my code, most likely soemwhere deep in .net framework... thank you, calin

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups