Modal Forms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?UG9vamEgTmFyYW5n?=

    Modal Forms

    Hi,

    I have vb.net windows application where in i am opening a modal form-
    SubForm1 from MainForm1 (Not an MDIParent). When I switch over to another
    application such as IE Browser window and get back to my application, the
    modal form appears on top of the IE Browser window and not as a part of
    MainForm1. I want the SubForm1 to always appear on top of MainForm1. I have
    tried the following options:

    I tried to set the owner of SubForm1 as MainForm1.
    I also set the FormBorderStyle property of both MainForm1 and SubForm1 to
    FixedSingle, but it didnt work.
    When I tried to set the FormBorderStyle property to SizeableToolWin dow,
    SubForm1 comes always on top of MainForm1 but My Application is not visible
    in ALT+TAB. It becomes accessible only through Taskbar.

    Please let me know what property needs to be set to get the SubForm1 always
    on top of MainForm1 and also the application should be accessible through
    ALT+TAB.

    Regards,
    Pooja
  • Lloyd Sheen

    #2
    Re: Modal Forms

    Pooja Narang wrote:
    Hi,
    >
    I have vb.net windows application where in i am opening a modal form-
    SubForm1 from MainForm1 (Not an MDIParent). When I switch over to another
    application such as IE Browser window and get back to my application, the
    modal form appears on top of the IE Browser window and not as a part of
    MainForm1. I want the SubForm1 to always appear on top of MainForm1. I have
    tried the following options:
    >
    I tried to set the owner of SubForm1 as MainForm1.
    I also set the FormBorderStyle property of both MainForm1 and SubForm1 to
    FixedSingle, but it didnt work.
    When I tried to set the FormBorderStyle property to SizeableToolWin dow,
    SubForm1 comes always on top of MainForm1 but My Application is not visible
    in ALT+TAB. It becomes accessible only through Taskbar.
    >
    Please let me know what property needs to be set to get the SubForm1 always
    on top of MainForm1 and also the application should be accessible through
    ALT+TAB.
    >
    Regards,
    Pooja
    In the ShowDialog method add the parameter "me" (not in quotes) so that
    the calling form is the parent of the modal dialog. Then you will see
    the behaviour you are looking for.

    LS

    Comment

    • =?Utf-8?B?UG9vamEgTmFyYW5n?=

      #3
      Re: Modal Forms



      "Lloyd Sheen" wrote:
      Pooja Narang wrote:
      Hi,

      I have vb.net windows application where in i am opening a modal form-
      SubForm1 from MainForm1 (Not an MDIParent). When I switch over to another
      application such as IE Browser window and get back to my application, the
      modal form appears on top of the IE Browser window and not as a part of
      MainForm1. I want the SubForm1 to always appear on top of MainForm1. I have
      tried the following options:

      I tried to set the owner of SubForm1 as MainForm1.
      I also set the FormBorderStyle property of both MainForm1 and SubForm1 to
      FixedSingle, but it didnt work.
      When I tried to set the FormBorderStyle property to SizeableToolWin dow,
      SubForm1 comes always on top of MainForm1 but My Application is not visible
      in ALT+TAB. It becomes accessible only through Taskbar.

      Please let me know what property needs to be set to get the SubForm1 always
      on top of MainForm1 and also the application should be accessible through
      ALT+TAB.

      Regards,
      Pooja
      >
      In the ShowDialog method add the parameter "me" (not in quotes) so that
      the calling form is the parent of the modal dialog. Then you will see
      the behaviour you are looking for.
      >
      LS
      >
      Hi ,

      I tried ShowDialog(me) but it didnt work. Is there any other solution?

      Thanks and Regards,
      Pooja

      Comment

      Working...