I cannot get focus in my form (modal)! AC2011

I cannot get focus in my form (modal)! AC2011

Anonymous
Not applicable
1,451 Views
7 Replies
Message 1 of 8

I cannot get focus in my form (modal)! AC2011

Anonymous
Not applicable

Hello people,

 

I have severals macros (vba) that where used normaly in previous versions of autocad (2010 and 2000).

 

But now with AutoCad 2011 I am having problems when I have to load a form (vbmodal, not moddeless)... I cannot get focus so it is almost impossible to write in the textbox control and is hard to use any vba controls.

 

I am using a windows 7 64 bits but I don't have the same problems when I use the same macro in Office 2003.

 

example of my form call:

-----------------------------------------

UserForm1.Show vbModal

-----------------------------------------

 

What should I do??? I wouldn't like to change my codes to newer versions of VB... it would be my last alternative...

 

Thank you a lot,

 

Diego Álvares

 

 

 

0 Likes
1,452 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable

Same problem...No solution...yet.

0 Likes
Message 3 of 8

Anonymous
Not applicable

No, I haven't found the solution...

 

And it is very annoying, I cannot use several macros...

 

 

0 Likes
Message 4 of 8

Anonymous
Not applicable

Please let me know is you find something.  This is driving me crazy.

0 Likes
Message 5 of 8

Anonymous
Not applicable

This may not be of any help at all, but the behavior you describe is exactly what I see in 2007 and 2010 when a form is showing as vbModeless but without an acFocusCtrl control object placed somewhere on the form. The acFocusCtrl object shows up as an Additional Toolbox control item when the AutoCAD Focus Control for VBA Type Library is added to application's References via the Tools => References top menu pulldown. I don't have 2011 to see what you are seeing. You might try adding the acFocusCtrl control object to your form.

0 Likes
Message 6 of 8

Anonymous
Not applicable

Hello Aseidel,

 

Thank you for your reply!

I've found the acFocusCtrl and now I am trying it in my codes...

At same time, even without the focus control, my forms are not with stranges behaviors anymore... And I don't know why... They are normal again.

 

Thank you,

 

Diego

0 Likes
Message 7 of 8

Anonymous
Not applicable

Aseidel

That works great.  Problem solved.

 

Thanks,

 

0 Likes
Message 8 of 8

Anonymous
Not applicable

You are welcome. I am finding the same thing. Adding the acFocusCtrl improves the interface performace and so far it does not seem to introduce the fatal errors seen in 2007.

0 Likes