.NET

Reply
Active Member
nklong
Posts: 10
Registered: ‎05-10-2012
Message 1 of 6 (212 Views)

ShowModelessDialog problem

212 Views, 5 Replies
05-21-2013 12:49 AM

I showed a form with ShowModelessDialog in this way:

 

MyForm fr = new  MyForm();

Application.ShowModelessDialog(null, fr, true);

 

But when I use this.Hide() in control event, It usually jump to another window. AutoCAD is not active.

How to fix this, pls help.

Thanks.

Mentor
mzakiralam
Posts: 229
Registered: ‎11-09-2012
Message 2 of 6 (205 Views)

Re: ShowModelessDialog problem

05-21-2013 01:28 AM in reply to: nklong
Please try :
Application.ShowModelessDialog(null, fr, false);

Active Member
nklong
Posts: 10
Registered: ‎05-10-2012
Message 3 of 6 (202 Views)

Re: ShowModelessDialog problem

05-21-2013 01:40 AM in reply to: mzakiralam

Thank you so much. I already try your way, but still the same.

Mentor
mzakiralam
Posts: 229
Registered: ‎11-09-2012
Message 4 of 6 (194 Views)

Re: ShowModelessDialog problem

05-21-2013 01:57 AM in reply to: nklong
I have just tried this way and it is working for me:

testfrm f_test = new testfrm();
Application.ShowModelessDialog(f_test);

Then put the below code in a button
this.Hide()
Active Member
nklong
Posts: 10
Registered: ‎05-10-2012
Message 5 of 6 (180 Views)

Re: ShowModelessDialog problem

05-21-2013 03:04 AM in reply to: mzakiralam

I don't know why. If my form is simple, it's corect. But if have a lot of thing in form. When call this.Hide() always jump to another window.

 

Mentor
mzakiralam
Posts: 229
Registered: ‎11-09-2012
Message 6 of 6 (158 Views)

Re: ShowModelessDialog problem

05-21-2013 10:17 AM in reply to: nklong
Then I think that you should show your code otherwise nobody can help you. May be there is something wrong with your code. Please make sure that as your are using modeless dialog, so you should lock the document before you want to do something. otherwise it will create problem.

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