How do I display a hidden form?

Discussion in 'AutoCAD' started by ajtruckle, Mar 9, 2005.

  1. ajtruckle

    ajtruckle Guest

    The user presses a button on the form and the handler for the button does

    Me.Hide

    to hide the form and let them do some stuff in Autocad, like select a entity.

    Once the entity is selected, it does me.show again. but this is not right, because the show method is displaying a modal dialogue and thsu my code halts until that dialogue is dismissed.

    So I tried using the me.visible = true and it said it is not valid code.

    In visual c++ programming you do the domodal call ONCE and hide/show the window at will. So I am not sure what I am supposed to do to get this working right. All I want is ability to hide and show the same window, not unload and reload or anything...

    Andrew
     
    ajtruckle, Mar 9, 2005
    #1
  2. ajtruckle

    Norman Yuan Guest

    The process should be:

    a. Hide form;
    b. User do something on Acad drawing editor: picking/moving entities...
    c. Manipulate controls on form accroding to user's action
    d. Show form

    Example:

    Me.Hide

    Dim pt As Variant

    pt=ThisDrawing.Utility.GetPoint(, vbcr & "Pick a point: ")

    Me.txtPointX=pt(0)
    Me.txtPointY=pt(1)

    Me.Show

    Now, the dialog box shows X, Y coordinates of the point user just picked.
    The key point is, the hidden form is still an instance of a UserForm object,
    reachable in memory, unless you use Unload Me, instead of Me.Hide.

    right, because the show method is displaying a modal dialogue and thsu my
    code halts until that dialogue is dismissed.
    window at will. So I am not sure what I am supposed to do to get this
    working right. All I want is ability to hide and show the same window, not
    unload and reload or anything...
     
    Norman Yuan, Mar 9, 2005
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.