Modeless Addin Dialog

Modeless Addin Dialog

Anonymous
Not applicable
325 Views
2 Replies
Message 1 of 3

Modeless Addin Dialog

Anonymous
Not applicable
I have searched the group and read the posts on this, but I am still
confused. What are the steps to get a Addin Dialog box to show modeless,
and stay on top. Charles helped me with some code to get it to stay on
top, but it stays on top of all programs, not just Inventor.

I would really appreciate any help.

--
Kent Keller
Member of the Autodesk Discussion Forum Moderator Program

http://www.MyMcad.com/KWiK/Mcad.htm
0 Likes
326 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Add the following to a module:

Public g_oIvApp As Inventor.Application

Public Const GWL_HWNDPARENT = (-8)

Public Declare Function SetWindowLong Lib "user32" Alias
"SetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex As Long, ByVal wNewLong As Long) As
Long
_________________

Declare a form level variable in your form:

Private OriginalParenthWnd As Long


And in your form_load event:

Private Sub Form_Load()
'set parent window to main IV window
OriginalParenthWnd = SetWindowLong(Me.hwnd, GWL_HWNDPARENT,
g_oIvApp.MainFrameHWND)
End Sub


HTH (I'll put a virtual bxxr on your tab )
Neil




"Kent Keller" wrote in message
news:FF9FF295F6E4106FC5742F304335B0A8@in.WebX.maYIadrTaRb...
> I have searched the group and read the posts on this, but I am still
> confused. What are the steps to get a Addin Dialog box to show modeless,
> and stay on top. Charles helped me with some code to get it to stay on
> top, but it stays on top of all programs, not just Inventor.
>
> I would really appreciate any help.
>
> --
> Kent Keller
> Member of the Autodesk Discussion Forum Moderator Program
>
> http://www.MyMcad.com/KWiK/Mcad.htm
>
>
0 Likes
Message 3 of 3

Anonymous
Not applicable
Once I figured out that I didn't want to be declaring Inventor.Application
two places in my code 8^) and I replaced your g_oIvApp with my oApp in the
Form load code it all worked fine 8^)

Thanks... When it starts getting into the API calls it all just looks like
gobbldy goop to me.

I don't know anything about bxxr but if we ever meet I will gladly buy you a
real Beer or two.

--
Kent Keller
Member of the Autodesk Discussion Forum Moderator Program

http://www.MyMcad.com/KWiK/Mcad.htm

"Neil Munro" wrote in message
news:5358AD40BDAEF470825DEFB1DA958BC8@in.WebX.maYIadrTaRb...
> Add the following to a module:
0 Likes