Results 1 to 1 of 1

Thread: Non-Modal Form dissapearing

  1. #1
    Active Member
    Join Date
    2007-12
    Posts
    68
    Login to Give a bone
    0

    Default Non-Modal Form dissapearing

    I was surprised to see this, Ive just never had a project with a only single, non-modal form to show onscreen.

    If run from the IDE, all runs well, it shows on screen, the acFocus Control allows access to the text box, etc, and closes when asked.

    But when the project is run from another macro (a lisp that calls a VBA Loader), the form shows onscreen and instantly blinks back off. "SHOW 1" works, of course, but then there is no interactivity.

    Am I missing something basic here?
    Code:
    ;------------------------------------------------------------------------------
    ;first, the lisp that defines the command:
    ; define launcher to search sheet sets for view names
    (defun c:ssfind ()
     (setvar "cmdecho" 0)
     (VL-VBARUN "SearchSheetSets")
     (setvar "cmdecho" 1)
     (princ)
    )
    ;-----------------------------------------------------------------------------
    ' now the routine, in a separate VBA Project, that I use to load, then unload, VBA Projects. Ive pasted the Constants from the top of the module next to the Subroutine, for brevity...
    Code:
    '--------------------------------------------------------------------------------------------
    Private Const BASE_UTIL_DIR As String = "X:\Tools\_Utils\"
    Private Const SS_FIND_FILENAME = "Sheet_Set_Find.dvb"
    Private Const SS_FIND_START_ROUTINE = "modStart_Find_Main.StartFindMain"
    
    Sub SearchSheetSets()
    ' call routine to serach sheet sets
    
        Dim FileName As String
        FileName = BASE_UTIL_DIR & SS_FIND_FILENAME
    
        ' Load a sample VBA project DVB file
        LoadDVB FileName
        
        ' Run the referenced macro
        RunMacro SS_FIND_START_ROUTINE
        
        ' Unload the VBA project DVB file now.
        UnloadDVB FileName
    
    End Sub
    '-------------------------------------------------
    and in the Sheet set search project, it calls a routine in a code module, that loads the form...

    Code:
    Sub StartFindMain()
    frmSearch.Show
    End Sub
    I've used this method on all my utils, and havent had a problem until the non modal form.
    Anyone know a way around this?
    Last edited by Ed Jobe; 2009-08-31 at 02:58 PM.

Similar Threads

  1. Non-Modal dialogs
    By revit.wishlist1942 in forum Revit Architecture - Wish List
    Replies: 1
    Last Post: 2012-08-06, 03:25 PM
  2. modal and seismic analysis
    By mecheil2000 in forum Robot Structural Analysis
    Replies: 6
    Last Post: 2011-10-12, 08:58 AM
  3. Sending Commands to Command Line From Modal Form
    By Ivan.Markov.206575 in forum Dot Net API
    Replies: 1
    Last Post: 2009-07-23, 02:50 PM
  4. Non-modal dialog boxes
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2006-01-31, 01:08 AM
  5. Cut Geometry, Solid form, Void form
    By mmolina in forum Revit Architecture - General
    Replies: 2
    Last Post: 2005-05-11, 09:33 PM

Posting Permissions

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