.NET

Reply
Active Contributor
markgardiner
Posts: 48
Registered: ‎11-03-2003
Message 1 of 7 (173 Views)

Modeless form

173 Views, 6 Replies
10-02-2005 03:21 PM
Hi All

I am trying to use a modeless form.
In the .net documentation it says to use the show() method for modeless dialog and the showdialog() method for a modal dialog. But as soon as I click on the acad my for disappears behind acad. If I set my forms Topmost = true, my form stays on top off all applications not just acad.

How do I show my form modelessly in acad and keep it on top of acad only ?

Thanks Mark
*Tony Tanzillo
Message 2 of 7 (173 Views)

Re: Modeless form

10-02-2005 07:35 PM in reply to: markgardiner
Use the ShowModelessDialog() method of the
Autodesk.AutoCAD.ApplicationServices.Application class.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

wrote in message news:4973106@discussion.autodesk.com...
Hi All

I am trying to use a modeless form.
In the .net documentation it says to use the show() method for modeless dialog and the showdialog() method for a modal dialog. But as soon as I click on the acad my for disappears behind acad. If I set my forms Topmost = true, my form stays on top off all applications not just acad.

How do I show my form modelessly in acad and keep it on top of acad only ?

Thanks Mark
*Mark Gardiner
Message 3 of 7 (173 Views)

Re: Modeless form

10-03-2005 05:32 PM in reply to: markgardiner
Thanks Tony,

I am guessing that is in 2006 and not in 2005 as I cannot seem to find it in
2005

Mark
"Tony Tanzillo" wrote in message
news:4973170@discussion.autodesk.com...
Use the ShowModelessDialog() method of the
Autodesk.AutoCAD.ApplicationServices.Application class.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

wrote in message news:4973106@discussion.autodesk.com...
Hi All

I am trying to use a modeless form.
In the .net documentation it says to use the show() method for modeless
dialog and the showdialog() method for a modal dialog. But as soon as I
click on the acad my for disappears behind acad. If I set my forms Topmost
= true, my form stays on top off all applications not just acad.

How do I show my form modelessly in acad and keep it on top of acad only ?

Thanks Mark
Distinguished Contributor
fantum
Posts: 313
Registered: ‎12-06-2004
Message 4 of 7 (173 Views)

Re: Modeless form

10-04-2005 07:29 AM in reply to: markgardiner
You might try using SetWindowLong() from user32.dll with its second parameter set to GWL_HWNDPARENT (-8) to tell your form that acad is its parent.
*Mark Gardiner
Message 5 of 7 (173 Views)

Re: Modeless form

10-04-2005 05:24 PM in reply to: markgardiner
Thanks,
I have found a couple examples.

Mark

wrote in message news:4974631@discussion.autodesk.com...
You might try using SetWindowLong() from user32.dll with its second
parameter set to GWL_HWNDPARENT (-8) to tell your form that acad is its
parent.
*Tony Tanzillo
Message 6 of 7 (173 Views)

Re: Modeless form

10-04-2005 06:01 PM in reply to: markgardiner
There's no need to call SetWindowLong() if you just call
ShowModelessDialog(), because it does all of that for you.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Mark Gardiner" wrote in message news:4975542@discussion.autodesk.com...
Thanks,
I have found a couple examples.

Mark

wrote in message news:4974631@discussion.autodesk.com...
You might try using SetWindowLong() from user32.dll with its second
parameter set to GWL_HWNDPARENT (-8) to tell your form that acad is its
parent.
Active Contributor
markgardiner
Posts: 48
Registered: ‎11-03-2003
Message 7 of 7 (173 Views)

Re: Modeless form

10-04-2005 06:09 PM in reply to: markgardiner
Thanks Tony,

Unfortunately we are stuck with acad 2005, I found ShowModelessDialog() in the 2006 reference but not in the 2005 reference.

That's why I thought I would try SetWindowLong()

Mark

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community