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

No form visible in 32-bit compiled .DLL

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
coralie.jacobi
599 Views, 4 Replies

No form visible in 32-bit compiled .DLL

I have an application that I have built that runs fine in AutoCAD 2013 in Win7. I need the same application to work in AutoCAD 2013, XP- 32-bit.

 

I am using Interopp.dll and Interop.Common.dll that I know are specific for each 64-bit vs. 32-bit. So I changed thoses references and recompiled.

 

In the XP version, I get no errors when I load the .DLL, however all I get when I execute the command is a tab along the bottom, no form pop's up.

 

No idea where to look to resolve this, any help would be very appreciated.

 

cj

4 REPLIES 4
Message 2 of 5
hgasty1001
in reply to: coralie.jacobi

Hi,

 

If You are not seeing the form, where are the  "tab along the bottom" displayed?, can you post a screen grab of the issue, and the code for calling the form to display?

 

Gaston Nunez

Message 3 of 5
coralie.jacobi
in reply to: hgasty1001

Here is the code to open the form...

 

      

SelectCaseApplication.ShowModalDialog(Myform)

               

Case System.Windows.Forms.DialogResult.OK

                   

Dim noblocklist AsString = ""

                   

Dim error_coord_cnt AsInteger = 0

                   

Dim blockmismatch AsString = ""

                   

Dim excelatt_ELEV AsString = ""

                   

Dim excelatt_CHEM AsString = ""

 

...............

 

See the attachment for what I get, just another tab after the AutoCAD one along the bottom of the screen.

 

Have tried on another XP 32-bit machine and the form comes in fine. Thinking it's a DLL missing???

Message 4 of 5

AutoCAD's ObjectARX document states that one should not use System.Windows.Forms.Form.Show()/ShowDialog() to open a form/dialogbox in AutoCAD. Instead, use Application.ShowModalDialog()/ShowModelessDialog().

 

It says that using Form.Show()/Showmodal() would lead AutoCAD to behave unexpectedly. This is what you are running into. The form (dialog box) is actually open, but somehow is hidden behind AutoCAD's main window.

 

If you click the taskbar icon for the form, it may be brought to front. Luckily, you did not set "ShowInTaskBar" property to false (you should, if you follow AutoCAD's UI style). This is because of your use of Form.ShowDialog(), hence the unexpected behaviour of AutoCAD.

 

You may say: but it works with Acad2013 + Win 7. Well, that was why Autodesk call it "unexpected" - it may work here and may not work there. The only sure thing is it works if you use Application.ShowModalDialog()/ShowModelessDialog().

Message 5 of 5

Think that did the trick....thanks for your help!!!

 

cj

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