Use Rhino3D V2 as an engine inside of the VB |
Private Sub Form_Load()
Dim x,m
' we can get this from the registry but for now->
hardcoded path !!!!
x = Shell("D:\rhino20\System\Rhino.exe D:\rhino20\System\rhino2.ini",
vbNormalNoFocus)
DoEvents or Sleep (2000)
'search for Rhino hwnd
m = GetAllWindows(0)
DoEvents
If m = "True" Then
'put it inside of the VB form
SetParent Rhino_hwnd, Form1.hwnd
End If
End Sub
or we can use FindWindow to find Rhino hwnd but static class name may
be changed with new update or version of Rhino3D
FindWindow("Rhino Parent 4194304 Class", vbNullString) as of Rhino's
V2. SR3
RHINO2.ini changes
[Main Window]
Maximized=n
Position=197,92,879,602
PositionResolution=1024,768
TitleBar=n
Menu=n
DockingToolbars=n
FullPathInTitleBar=n
All the project files can be found in here Download RhinoEngine
Thanks to Travis Serio for discovering this possibility.