• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    Active Member
    mikefr
    Posts: 8
    Registered: ‎08-20-2011

    Inspector (arx) cool features

    205 Views, 6 Replies
    03-11-2012 12:28 PM

    Hello all,

    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!

    Please use plain text.
    *Expert Elite*
    Posts: 6,427
    Registered: ‎06-29-2007

    Re: Inspector (arx) cool features

    03-11-2012 01:09 PM in reply to: mikefr

    Hi,

     

    >> 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 -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Active Member
    mikefr
    Posts: 8
    Registered: ‎08-20-2011

    Re: Inspector (arx) cool features

    03-11-2012 02:38 PM in reply to: alfred.neswadba

    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
    
    End Class

     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.

    Please use plain text.
    *Expert Elite*
    Posts: 6,427
    Registered: ‎06-29-2007

    Re: Inspector (arx) cool features

    03-11-2012 02:52 PM in reply to: mikefr

    Hi,

     

    >> Kean's blog. He's done great job

    Yes!

     

    >> 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 -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Active Member
    mikefr
    Posts: 8
    Registered: ‎08-20-2011

    Re: Inspector (arx) cool features

    03-11-2012 03:25 PM in reply to: alfred.neswadba

    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?

    Please use plain text.
    Active Contributor
    Posts: 44
    Registered: ‎06-04-2004

    Re: Inspector (arx) cool features

    03-11-2012 07:14 PM in reply to: mikefr

    Trap the MouseEnter/MouseLeave events of your pallet and set the KeepFocus property. Always worked for me.

     

    HomeBoy Out

    Please use plain text.
    Active Member
    mikefr
    Posts: 8
    Registered: ‎08-20-2011

    Re: Inspector (arx) cool features

    03-12-2012 03:07 AM in reply to: HomeBoyLV

    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?

    Please use plain text.