Results 1 to 18 of 18

Thread: Is this form modal?

Hybrid View

  1. #1
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Is this form modal?

    Quote Originally Posted by tward_biteme1
    You can check to see if you main form is enabled or not. If there is a form displayed modal then the form that brought it up is disabled.
    The form really isn't disabled, you just can't do anything with it, or any other window, until the modal form has been unloaded.

  2. #2
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Is this form modal?

    We had a need to "know" if a modal form was popped up on the screen - because we were subclassing for the APPACTIVATE message...

    And if we messed with FORM focus with a MODAL form on the screen, VB choked.

    We ended up creating a global boolean to track whenever a MODAL form was put on the screen so we could test that boolean.

    One odd place this was required was when we started printing with the PRINTER object and the user had a PDF-writer as the default printer. That PDF-writer would pop-up a file dialog box to ask for output filename. So we needed to set that global boolean at the start of a report as well.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  3. #3
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Is this form modal?

    Quote Originally Posted by Hack
    The form really isn't disabled, you just can't do anything with it, or any other window, until the modal form has been unloaded.
    Well, actually the owner form is disabled. However the Enabled property in VB isn't set but you can check if the owner form has the WS_DISABLED style bit set.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width