Author Topic: Using ShowModelessWindow instead of ShowModelessDialog in AutoCAD 2013  (Read 2401 times)

0 Members and 1 Guest are viewing this topic.

cannorth

  • Guest
Hello,

  I had code that would load a form using ShowModelessDialog, but it seems this no longer exists in AutoCAD 2013.  I'm trying to do this now:

Code: [Select]
        Dim cur_form As New MainForm

        cur_form.Show()
        Autodesk.AutoCAD.ApplicationServices.Core.Application.ShowModelessWindow(cur_form)

   However, the argument for ShowModelessWindow doesn't accept something of type Form.  Is there a way to use my form as a window for ShowModelessWindow, or have I missed the ShowModelessDialog method in some other namespace?

Thanks,

cannorth

gile

  • Gator
  • Posts: 2520
  • Marseille, France
Re: Using ShowModelessWindow instead of ShowModelessDialog in AutoCAD 2013
« Reply #1 on: November 20, 2012, 05:26:19 PM »
Try :

Code - vb.net: [Select]
  1. Autodesk.AutoCAD.ApplicationServices.Application.ShowModelessDialog(cur_form)
Speaking English as a French Frog

cannorth

  • Guest
Re: Using ShowModelessWindow instead of ShowModelessDialog in AutoCAD 2013
« Reply #2 on: November 20, 2012, 05:30:38 PM »
I figured out the problem.  I had to delete and reload my references for AutoCAD 2013.  The namespace that gile posted wouldn't work until I did that.

cannorth

gablackburn

  • Guest
Re: Using ShowModelessWindow instead of ShowModelessDialog in AutoCAD 2013
« Reply #3 on: August 15, 2013, 02:07:29 PM »
cannorth, thank you for mentioning this as I was having a problem where my modeless dialog box wouldn't stay on top of the active AutoCAD window, it kept moving behind the Acad window. 

I reloaded the .DLLs (and deleted some stray ones which got into my \Debug folder), and all's well now.

I wouldn't have tried that if you didn't make your comment.  Thanks.