ShowModelessDialog problem

ShowModelessDialog problem

Anonymous
Not applicable
1,617 Views
5 Replies
Message 1 of 6

ShowModelessDialog problem

Anonymous
Not applicable

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.

0 Likes
1,618 Views
5 Replies
Replies (5)
Message 2 of 6

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

0 Likes
Message 3 of 6

Anonymous
Not applicable

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

0 Likes
Message 4 of 6

Anonymous
Not applicable
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()
0 Likes
Message 5 of 6

Anonymous
Not applicable

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.

 

0 Likes
Message 6 of 6

Anonymous
Not applicable
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.
0 Likes