Notifications
Clear all
[Closed] Method to use DotNet controls instead of ActiveX
Mar 23, 2007 3:36 pm
Hi,
I want to write a portable MAXScript (between Max version of course) that uses a ListView control : DotNet ListView when 3ds Max 9 is detected or an ActiveX Listivew.
I found a tricky solution using a script that generate the final macroScript using format. It wasn't possible to run (under 3ds max 8 for example) a script containing dotNetControl statement even if this portion of code isn't executed.
For example :
-- Macroscript filename
macroFilename = ((GetDir #scripts) + "\\objectInspector.mcr")
-- Create macroscript file
macroFile = createfile macroFilename
-- Get Max version
version = (maxversion())[1]
etc...
format "rollout rollObjectInspector sObjectInspectorTitle
" to:macroFile
format "(
" to:macroFile
if version >= 9000 then
(
format "dotNetControl listView \"System.Windows.Forms.ListView\" width:390 height:190 align:#center
" to:macroFile
)
else
(
format "activeXControl listView \"MSComctlLib.ListViewCtrl\" width:390 height:190 align:#center
" to:macroFile
)
etc...
-- Run Macroscript
fileIn macroFilename
I know that Submit 3ds Max To Deadline 2.6 Script developed by Bobo at Frantic Films uses DotNet controls instead of ActiveX controls when 3ds Max 9 is detected. Maybe Bobo can help me on this problem.