custom pane as a form

custom pane as a form

omartin
Advocate Advocate
364 Views
2 Replies
Message 1 of 3

custom pane as a form

omartin
Advocate
Advocate

Is it possible to create a custom panel with labels/textboxes/button that will act as a form?

I see in the documentation you can add activeX controls but I cant find where the textbox and other controls would be located.

I'm on windows 8 using Vstudio.

thx

 

edit:

I Found the dock able window object which looks like it will work: but what is the hwnd value below: is it just some random number

        ' Get the hwnd of the dialog to be added as a child
        ' CHANGE THIS VALUE!
        Dim hwnd As Long
        hwnd = 4851096

 

Was my reply Helpful ? send a Kudos or accept as solution
0 Likes
365 Views
2 Replies
Replies (2)
Message 2 of 3

JamieVJohnson2
Collaborator
Collaborator

HWND is a random value (per windows session), because it is the in-process ID of that window, first come first served.  In short, a memory address (of sorts). 

 

Sounds to me like your coming from a VB background using Windows Forms.  If so, then I suggest you drop that platform, and move onto WPF (Windows Presentation Foundation), no small learning curve.

 

If you want to create a custom window (form), and you have Visual Studio, then I suggest you build a  (WPF) "WINDOW" class, set it to a variable and call 'show' on it when your codes want's too.  It will be an XAML front end with a .Net back end (vb for me, can use c# too)  It will be up to your window to initialize all the work.  My projects reside outside of the Inventor process, and my (ex. wdSomething window class) windows can be opened using:

dim wd new wdSomething
wd.Show 'or wd.ShowDialog

 You will then have the more modern full set of controls in a toolbox you can use.  Windows Forms (older) has a toolbox, but it is not well supported any more (over 10 years passed), so getting help for it will be difficult.

Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
Message 3 of 3

omartin
Advocate
Advocate

I was able to find out how to use the docakable window through previous threads.

 

But, WPF was not on my radar, from my little poking around with it, it does seem more efficient for creating UIs especially when trying to align things. Thanks for the info!

 

Was my reply Helpful ? send a Kudos or accept as solution
0 Likes