.NET

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

ShowModelessDialog problem

171 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: 221
Registered: ‎11-09-2012
Message 2 of 6 (164 Views)

Re: ShowModelessDialog problem

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

Active Member
Posts: 10
Registered: ‎05-10-2012
Message 3 of 6 (161 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: 221
Registered: ‎11-09-2012
Message 4 of 6 (153 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
Posts: 10
Registered: ‎05-10-2012
Message 5 of 6 (139 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: 221
Registered: ‎11-09-2012
Message 6 of 6 (117 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 interested in helping shape the Autodesk Community?
We’re looking at a few different ways to improve the “All Forums” landing page and need your feedback! If interested, please take a few minutes to fill out the following Usability Study. Thank you for your time!

Need installation help?

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

Ask the Community