Modeless forms

Modeless forms

Anonymous
Not applicable
1,128 Views
6 Replies
Message 1 of 7

Modeless forms

Anonymous
Not applicable
When I design a user form as modeless, I cannot keep the focus on the
modless form (the focus always pops back to the Autocad Application window).
I click on any object in the modless form and have it respon (ie command
buttons, check boxes, etc...), but the form does not retain the focus to
allowing typing into a text box.

I am using Autocad 2002.
0 Likes
1,129 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
AutoCAD sends messages to all child windows to see if they want to
retain focus when the mouse cursor moves off of the window. The
VBA form is probably responding to the message and that's causing
AutoCAD to take the focus. I believe that Autodesk has some kind of
ActiveX control to deal with this.

Regards,
Bill

"Joe LeBaron" wrote in message
news:E2D186888E5A44F351A9F06EFDA7992B@in.WebX.maYIadrTaRb...
> When I design a user form as modeless, I cannot keep the focus on the
> modless form (the focus always pops back to the Autocad Application
window).
> I click on any object in the modless form and have it respon (ie command
> buttons, check boxes, etc...), but the form does not retain the focus to
> allowing typing into a text box.
>
> I am using Autocad 2002.
>
>
>
0 Likes
Message 3 of 7

Anonymous
Not applicable
Joe LeBaron wrote:

> but the form does not retain the focus to
> allowing typing into a text box.

You could bring up a modal InputBox upon the click event of the text
box, then pump it's results back into the text field. It's not good but
its only workaround I know.

Terry
0 Likes
Message 4 of 7

Anonymous
Not applicable
Yikes... Effective but ugly.

"Terry W. Dotson" wrote in message
news:3B92F3E1.508AC49@dotsoft.com...
> Joe LeBaron wrote:
>
> > but the form does not retain the focus to
> > allowing typing into a text box.
>
> You could bring up a modal InputBox upon the click event of the text
> box, then pump it's results back into the text field. It's not good but
> its only workaround I know.
>
> Terry
0 Likes
Message 5 of 7

Anonymous
Not applicable
Add reference to "C:\Program Files\Common Files\Autodesk
Shared\AcFocusCtrl.dll".
The control has a property "KeepFocus". Set it to True.
"Joe LeBaron" wrote in message
news:6B4D86A101F6BF7301D7BF07A707EF94@in.WebX.maYIadrTaRb...
> Yikes... Effective but ugly.
>
> "Terry W. Dotson" wrote in message
> news:3B92F3E1.508AC49@dotsoft.com...
> > Joe LeBaron wrote:
> >
> > > but the form does not retain the focus to
> > > allowing typing into a text box.
> >
> > You could bring up a modal InputBox upon the click event of the text
> > box, then pump it's results back into the text field. It's not good but
> > its only workaround I know.
> >
> > Terry
>
>
0 Likes
Message 6 of 7

Anonymous
Not applicable
Thanks Ravi that is a gem of a tip.

I have one problem with it though, and it is probably something easy, but when I react to
a "enter" in a text box with a standard KeyDown event, I don't seem to be able to put
the focus back on the text box afterwards, and consequently have to click on it to enter
more info.

--
Kent


"Ravi Pothineni" wrote in message
news:FFC399020D169F85340F4866C410D94B@in.WebX.maYIadrTaRb...
> Add reference to "C:\Program Files\Common Files\Autodesk
> Shared\AcFocusCtrl.dll".
> The control has a property "KeepFocus". Set it to True.
> "Joe LeBaron" wrote in message
> news:6B4D86A101F6BF7301D7BF07A707EF94@in.WebX.maYIadrTaRb...
> > Yikes... Effective but ugly.
> >
> > "Terry W. Dotson" wrote in message
> > news:3B92F3E1.508AC49@dotsoft.com...
> > > Joe LeBaron wrote:
> > >
> > > > but the form does not retain the focus to
> > > > allowing typing into a text box.
> > >
> > > You could bring up a modal InputBox upon the click event of the text
> > > box, then pump it's results back into the text field. It's not good but
> > > its only workaround I know.
> > >
> > > Terry
> >
> >
>
>
0 Likes
Message 7 of 7

Anonymous
Not applicable
I am trying to do the same thing with acad 2ki but I do not have the dll
file, is there another way to do this in a2ki ?? or is there somewhere I can
get it from ??
Many thanks
Mark

"Ravi Pothineni" wrote in message
news:FFC399020D169F85340F4866C410D94B@in.WebX.maYIadrTaRb...
> Add reference to "C:\Program Files\Common Files\Autodesk
> Shared\AcFocusCtrl.dll".
> The control has a property "KeepFocus". Set it to True.
> "Joe LeBaron" wrote in message
> news:6B4D86A101F6BF7301D7BF07A707EF94@in.WebX.maYIadrTaRb...
> > Yikes... Effective but ugly.
> >
> > "Terry W. Dotson" wrote in message
> > news:3B92F3E1.508AC49@dotsoft.com...
> > > Joe LeBaron wrote:
> > >
> > > > but the form does not retain the focus to
> > > > allowing typing into a text box.
> > >
> > > You could bring up a modal InputBox upon the click event of the text
> > > box, then pump it's results back into the text field. It's not good
but
> > > its only workaround I know.
> > >
> > > Terry
> >
> >
>
>
0 Likes