.NET

Reply
Active Member
mikefr
Posts: 8
Registered: ‎08-20-2011
Message 1 of 7 (323 Views)

Inspector (arx) cool features

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

*Expert Elite*
Alfred.NESWADBA
Posts: 9,417
Registered: ‎06-29-2007
Message 2 of 7 (320 Views)

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
-------------------------------------------------------------------------
Active Member
mikefr
Posts: 8
Registered: ‎08-20-2011
Message 3 of 7 (310 Views)

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.

*Expert Elite*
Alfred.NESWADBA
Posts: 9,417
Registered: ‎06-29-2007
Message 4 of 7 (305 Views)

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
-------------------------------------------------------------------------
Active Member
mikefr
Posts: 8
Registered: ‎08-20-2011
Message 5 of 7 (302 Views)

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?

Active Contributor
HomeBoyLV
Posts: 47
Registered: ‎06-04-2004
Message 6 of 7 (288 Views)

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

Active Member
mikefr
Posts: 8
Registered: ‎08-20-2011
Message 7 of 7 (275 Views)

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?

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!