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

ShowDialog not showing form

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
mnav
3518 Views, 7 Replies

ShowDialog not showing form

Hi

i have and autocad 2011 addin which download a drawing from internet and open it in autocad.
 i am using a web browser control on a win form to display a webpage from where i am downloading my drawing. it is working fine on xp 32bit.
During testing on Windows 7 64bit  after some time i m unable to see my form when i click open button on ribbon.
Showdialog() call from button only display the icon and title of my form in windows taskbar but Form is not visible on the screen.

i tried the Autodesk.AutoCAD.ApplicationServices.Application.ShowModalDialog no luck.

  only solution to make it work again is to remove my windows profile and create it again.

 i cant understand the problem please help.

 i am using VS2010 and C# with Autocad 2011.

 

thanks

nav

7 REPLIES 7
Message 2 of 8
Alfred.NESWADBA
in reply to: mnav

Hi,

 

are you sure it's not just the display-order, so your dialog hides behind AutoCAD? I've got troubles when I changed to Win7, the ZOrder does not work automatically bringing dialogs on top. So now I use .BringToFront multiple times to ensure it's in front of other applications.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 8
stuartnathan
in reply to: mnav

Can I ask if the application code is yours?

Does the form you are trying to show have ShowInTaskbar = True

When you expect the ShowDialog to execute, is the form in the task bar?

all you need in the code is Form.ShowDialog(), at which point control remains in the form and the code will not continue to execute. Have you tried debugging and see whether in fact you even get to this statement?

 

Good luck.

Message 4 of 8
mnav
in reply to: mnav

It was working but after few calls to showdialog it stoped working even pc restart don't help. Its my own code I can debug but when it reach showdialog call it only show entery in task bar. If I close it from taskbar then step to next statement
Message 5 of 8
stuartnathan
in reply to: mnav

Can I assume that the Form.ShowDialog is not yours, and so you can't step through it?

If the code for the form is there, you should be able to step through it as well.

Message 6 of 8
mnav
in reply to: mnav

ShowDialog is my own code which calling System.windows.Forms.Form showdialog. i can step into it form load event get called but no form on the screen.

Message 7 of 8
Alfred.NESWADBA
in reply to: mnav

Hi,

 

have you looked to the property "ShowInTaskbar" as stuartnathan already mentioned, turn it on and then look if you see the form in the taskbar.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 8 of 8
mnav
in reply to: mnav

Thanks everybody for ther help solved the issue

i was recording the last position of the dialog on the screen. when i was closing the dialog from taskbar when its window not visible which is win7 feature it was recording the location and next time try to use that position to display form which was not valid location.

 

thanks

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