I have been using the arx application "inspector.arx" and i noticed some cool features this app has:
1. Inspector doesn't steal focus from autocad when the refresh button is clicked. Generally inspector doesn't steal focus.
2. Inspector can be docked like a palette
3. Autocad is always active when the mouse leaves the inspector form.
Is it possible to create an app with .net with similar features? Imagine a form with buttons, labels, listviews... etc.
Can anyone provide some tips or guidance to achieve that?
Thanks a lot!
>> Is it possible to create an app with .net with similar features? Imagine a form
That's imho the difference, you are speaking from a Windows-Form-object, but not from a palette-/paletteset-object. Make custom controls instead of Windows-Forms and place these on PaletteSet-objects. Makes all much easier, not just focus.
>>>here<<< is a sample done by Kean Walmsley.
- alfred -
Hi Alfred, I follow Kean's blog. He's done great job. I also tried palette but had problem with comboboxes. I use API version 17.2. Also when using a palette, you have to use custom controls to make them not stealing focus:
Public Class myButton Inherits Windows.Forms.Button Public Sub New() MyBase.New() SetStyle(Windows.Forms.ControlStyles.Selectable, False) End Sub
I even tried using the ToolStripDropDown class. What i want is a smooth back n forth from a modeless form to autocad application. Creating your own commands is cool but you can't remember 100 commands... Instead you can create a form with buttons, settings and stuff.
>> Kean's blog. He's done great job
>> but had problem with comboboxes
Correct, but I thought this workaround was not necessary since working base on Framework 3.5. But I'm not sure about this at the moment.
>> What i want is a smooth back n forth from a modeless form to autocad application.
>> Creating your own commands is cool but you can't remember 100 commands.
Forms will ever be a bit more work to sync the focus, the mouse/cursor, the visible or hidden (or minimized) mode with the AutoCAD-application window.
What I don't understand is the "100 commands" message? You can also place buttons on your usercontrol (on your palette) and that can start everything without needing any commands defined.
- alfred -
I just want to mention that a UI is the best solution when you create lots of commands. Something i noticed in inspector is that when it is clicked autocad doen't lose focus. Inspector looks like a form. I hope for some guidance to create a form with similar features. By the way is there any workaround for the combobox glitch?
Hi Homeboy, I have tried KeepFocus but no trapping the events. Do you mean creating a new class that inherits paletteset and overriding these two events? When the events fire i change the KeepFocus propertie?
Access a broad range of knowledge to help get the most out of your products and services.