.NET

Reply
Valued Mentor
AubelecBE
Posts: 394
Registered: ‎01-27-2010
Message 1 of 4 (282 Views)

what is the best use for a Windows Form ?

282 Views, 3 Replies
07-30-2012 09:52 AM

HI all.

 

What is the best way for launch a Form  ?

 

if Autodesk.AutoCAD.ApplicationServices.Application.ShowModalDialog(Fenetre) = Windows.Forms.DialogResult.OK Then

 

....

end if

 

or 

 

if Fenetre.ShowModal = Windows.Forms.DialogResult.OK Then

 

....

end if

 

 

I dunno what it the best way for it ?

 

How i can launch a child of MDI Form ?

 

in the Init of a MDI Form :

        FenetreCouleur = New FormConf0a_Couleur(Def)
        FenetreCouleur.MdiParent = Me
        FenetreCouleur.Show()

i use .show  it is the best way  ?

 

 

Board Manager
StephenPreston
Posts: 418
Registered: ‎05-22-2006
Message 2 of 4 (265 Views)

Re: what is the best use for a Windows Form ?

07-30-2012 03:09 PM in reply to: AubelecBE

Use Autodesk.AutoCAD.ApplicationServices.Application.S​howModalDialog to display a modal dialog. This API was introduced to overcome some problems associated with direct calls to Form.ShowModal from a. AutoCAD plug-in.

 

Cheers,

Stephen Preston
Autodesk Developer Network
Valued Mentor
AubelecBE
Posts: 394
Registered: ‎01-27-2010
Message 3 of 4 (251 Views)

Re: what is the best use for a Windows Form ?

07-31-2012 03:35 AM in reply to: StephenPreston

ah ok thx.

 

and for the mdi child ?

ADN Support Specialist
Virupaksha.aithal
Posts: 101
Registered: ‎06-15-2011
Message 4 of 4 (186 Views)

Re: what is the best use for a Windows Form ?

08-07-2012 03:37 AM in reply to: AubelecBE

Hi

 

Are you referring to modeless dialog? If yes, then use Autodesk.AutoCAD.ApplicationServices.Application.ShowModelessDialog

 

You can also refer http://adndevblog.typepad.com/autocad/2012/06/displaying-modal-and-modeless-forms-in-autocad-net.htm...



Virupaksha Aithal KM
Developer Technical Services
Autodesk Developer Network

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!