.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ShowModelessDialog problem

5 REPLIES 5
Reply
Message 1 of 6
nklong
724 Views, 5 Replies

ShowModelessDialog problem

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.

5 REPLIES 5
Message 2 of 6
mzakiralam
in reply to: nklong

Please try :
Application.ShowModelessDialog(null, fr, false);

Message 3 of 6
nklong
in reply to: mzakiralam

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

Message 4 of 6
mzakiralam
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()
Message 5 of 6
nklong
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.

 

Message 6 of 6
mzakiralam
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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost